// The Stand widget's custom elements, for JSX.
import type { DetailedHTMLProps, HTMLAttributes } from 'react';

type StandElement = DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement> & {
  greeting?: string;
  placeholder?: string;
  'send-label'?: string;
  'show-header'?: string;
  'show-when'?: string;
  'session-key'?: string;
  'height-mode'?: string;
  'max-height'?: string;
  prompt?: string;
  avatar?: string;
  message?: string;
  identity?: string;
  theme?: string;
};

// React's own JSX namespace: React 19's types have no global one.
declare module 'react' {
  // eslint-disable-next-line @typescript-eslint/no-namespace
  namespace JSX {
    interface IntrinsicElements {
      'stand-chatbox': StandElement;
      'stand-button': StandElement;
      'stand-card': StandElement;
    }
  }
}
