import {
type CSSResultGroup,
html,
LitElement,
type PropertyValues,
} from 'lit';
import { property, state } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { baseStyles } from './base-styles.js';
import { buildRequest, FetchController } from './fetch-controller.js';
import { MarkupDataController } from './markup-data.js';
/**
* Shared base for every data-driven Roxy component. Consolidates the things every component used to repeat by hand and adds the self-contained, drop-in behavior: controlled-mode hydration, an opt-in self-fetch (form, request, loading, error, empty), the typed `data` slot, and the render switch. A subclass implements one method, {@link RoxyDataElement.renderData}.
*
* @remarks
* Two render modes, one component, which is the whole drop-in contract:
*
* - Controlled: a server (WordPress, JSX SSR, static HTML) fetches the response and injects it as a direct-child `