/**
 * react.d.ts — AUTO-GENERATED, DO NOT EDIT
 *
 * Generated by generate-react-types.mjs from Stencil's components.d.ts
 * Re-run after every "stencil build" to keep types in sync.
 *
 * Usage in a React + TypeScript project:
 *
 *   // src/custom-elements.d.ts  (or any .d.ts file TypeScript picks up)
 *   import '@your-org/components/react';
 */

import type { Components } from './components';
import type { HTMLAttributes, ReactNode } from 'react';

/**
 * Maps a Stencil component interface to React-compatible element props.
 * - All Stencil props become optional (they already are, but this is explicit)
 * - Standard HTML/ARIA attributes are included via HTMLAttributes
 * - children and className are added for convenience
 */
type CustomElement<T> = Partial<T> &
  Omit<HTMLAttributes<HTMLElement>, keyof T> & {
    children?: ReactNode;
    class?: string;       // web components use class, not className
    part?: string;        // CSS shadow parts
    exportparts?: string;
    ref?: React.Ref<HTMLElement>;
  };

declare global {
  namespace React {
    namespace JSX {
      interface IntrinsicElements {
    'dds-avatar': CustomElement<Components.DdsAvatar>;
    'dds-banner': CustomElement<Components.DdsBanner>;
    'dds-box': CustomElement<Components.DdsBox>;
    'dds-button': CustomElement<Components.DdsButton>;
    'dds-button-group': CustomElement<Components.DdsButtonGroup>;
    'dds-chart': CustomElement<Components.DdsChart>;
    'dds-chip': CustomElement<Components.DdsChip>;
    'dds-color-scheme': CustomElement<Components.DdsColorScheme>;
    'dds-divider': CustomElement<Components.DdsDivider>;
    'dds-fieldset': CustomElement<Components.DdsFieldset>;
    'dds-flag': CustomElement<Components.DdsFlag>;
    'dds-grid': CustomElement<Components.DdsGrid>;
    'dds-grid-item': CustomElement<Components.DdsGridItem>;
    'dds-heading': CustomElement<Components.DdsHeading>;
    'dds-icon': CustomElement<Components.DdsIcon>;
    'dds-money-field': CustomElement<Components.DdsMoneyField>;
    'dds-paragraph': CustomElement<Components.DdsParagraph>;
    'dds-popover': CustomElement<Components.DdsPopover>;
    'dds-provider': CustomElement<Components.DdsProvider>;
    'dds-radio': CustomElement<Components.DdsRadio>;
    'dds-section': CustomElement<Components.DdsSection>;
    'dds-spacer': CustomElement<Components.DdsSpacer>;
    'dds-sparkline': CustomElement<Components.DdsSparkline>;
    'dds-spinner': CustomElement<Components.DdsSpinner>;
    'dds-stack': CustomElement<Components.DdsStack>;
    'dds-switch': CustomElement<Components.DdsSwitch>;
    'dds-tab': CustomElement<Components.DdsTab>;
    'dds-text': CustomElement<Components.DdsText>;
    'dds-text-field': CustomElement<Components.DdsTextField>;
      }
    }
  }
}

// Also augment the legacy JSX namespace for React 17 and older toolchains
declare namespace JSX {
  interface IntrinsicElements {
    'dds-avatar': CustomElement<Components.DdsAvatar>;
    'dds-banner': CustomElement<Components.DdsBanner>;
    'dds-box': CustomElement<Components.DdsBox>;
    'dds-button': CustomElement<Components.DdsButton>;
    'dds-button-group': CustomElement<Components.DdsButtonGroup>;
    'dds-chart': CustomElement<Components.DdsChart>;
    'dds-chip': CustomElement<Components.DdsChip>;
    'dds-color-scheme': CustomElement<Components.DdsColorScheme>;
    'dds-divider': CustomElement<Components.DdsDivider>;
    'dds-fieldset': CustomElement<Components.DdsFieldset>;
    'dds-flag': CustomElement<Components.DdsFlag>;
    'dds-grid': CustomElement<Components.DdsGrid>;
    'dds-grid-item': CustomElement<Components.DdsGridItem>;
    'dds-heading': CustomElement<Components.DdsHeading>;
    'dds-icon': CustomElement<Components.DdsIcon>;
    'dds-money-field': CustomElement<Components.DdsMoneyField>;
    'dds-paragraph': CustomElement<Components.DdsParagraph>;
    'dds-popover': CustomElement<Components.DdsPopover>;
    'dds-provider': CustomElement<Components.DdsProvider>;
    'dds-radio': CustomElement<Components.DdsRadio>;
    'dds-section': CustomElement<Components.DdsSection>;
    'dds-spacer': CustomElement<Components.DdsSpacer>;
    'dds-sparkline': CustomElement<Components.DdsSparkline>;
    'dds-spinner': CustomElement<Components.DdsSpinner>;
    'dds-stack': CustomElement<Components.DdsStack>;
    'dds-switch': CustomElement<Components.DdsSwitch>;
    'dds-tab': CustomElement<Components.DdsTab>;
    'dds-text': CustomElement<Components.DdsText>;
    'dds-text-field': CustomElement<Components.DdsTextField>;
  }
}
