/* global React, window */
// Adapter shim — exposes each campaign's artboard components on `window`
// under unique names so the library can render them by name.
//
// This avoids the global ReactDOM.createRoot calls at the bottom of each
// source JSX file (which would mount onto our root). We re-implement just
// the artboard component bindings here, by importing from the originals
// via a thin compatibility layer.
//
// The original files (ccc-system.jsx, ccc-launch-kit.jsx, ccc-first-monday.jsx)
// each do `const root = ReactDOM.createRoot(...)` at the bottom — we suppress
// that by stubbing out window.DesignCanvas / DCSection / DCArtboard to
// no-render, then capturing the component definitions before they get mounted.

// We use the technique: load each source file once. Each file defines its
// components in module scope, then calls ReactDOM.createRoot + render. We
// override DesignCanvas / DCSection / DCArtboard to return null so the App's
// render produces nothing, but the component definitions remain on `window`
// via explicit Object.assign exports we add to each source file later.
//
// For now, this file just provides the no-op canvas globals BEFORE the
// campaign JSXs load. The campaign JSXs need an `Object.assign(window, {...})`
// export at the bottom — handled by patching the source via a sister file.

window.__libNoCanvas = true;

window.DesignCanvas = function NoCanvas() { return null; };
window.DCSection    = function NoSection() { return null; };
window.DCArtboard   = function NoArtboard() { return null; };
