
import type { OrAttributeInputChangedEvent, getAttributeInputWrapper, getHelperText, jsonFormsInputTemplateProvider, OrAttributeInput } from "./lib/index.d.ts";

/**
 * This type can be used to create scoped tags for your components.
 *
 * Usage:
 *
 * ```ts
 * import type { ScopedElements } from "path/to/library/jsx-integration";
 *
 * declare module "my-library" {
 *   namespace JSX {
 *     interface IntrinsicElements
 *       extends ScopedElements<'test-', ''> {}
 *   }
 * }
 * ```
 *
 * @deprecated Runtime scoped elements result in duplicate types and can confusing for developers. It is recommended to use the `prefix` and `suffix` options to generate new types instead.
 */
export type ScopedElements<
  Prefix extends string = "",
  Suffix extends string = ""
> = {
  [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
};

type BaseProps<T extends HTMLElement> = {

  /** Content added between the opening and closing tags of the element */
  children?: any;
  /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
  class?: string;
  /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
  className?: string;
  /** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
  classList?: Record<string, boolean | undefined>;
  /** Specifies the text direction of the element. */
  dir?: "ltr" | "rtl";
  /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
  exportparts?: string;
  /** For <label> and <output>, lets you associate the label with some control. */
  htmlFor?: string;
  /** Specifies whether the element should be hidden. */
  hidden?: boolean | string;
  /** A unique identifier for the element. */
  id?: string;
  /** Keys tell React which array item each component corresponds to */
  key?: string | number;
  /** Specifies the language of the element. */
  lang?: string;
  /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
  part?: string;
  /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
  ref?: T | ((e: T) => void);
  /** Adds a reference for a custom element slot */
  slot?: string;
  /** Prop for setting inline styles */
  style?: Record<string, string | number>;
  /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
  tabIndex?: number;
  /** Specifies the tooltip text for the element. */
  title?: string;
  /** Passing 'no' excludes the element content from being translated. */
  translate?: "yes" | "no";
  /** The popover global attribute is used to designate an element as a popover element. */
  popover?: "auto" | "hint" | "manual";
  /** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
  popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
  /** Specifies the action to be performed on a popover element being controlled by a control element. */
  popovertargetaction?: "show" | "hide" | "toggle";

} ;

type BaseEvents = {


};



export type OrAttributeInputProps = {
  /**  */
  "attribute"?: OrAttributeInput['attribute'];
  /**  */
  "assetId"?: OrAttributeInput['assetId'];
  /**  */
  "attributeDescriptor"?: OrAttributeInput['attributeDescriptor'];
  /**  */
  "valueDescriptor"?: OrAttributeInput['valueDescriptor'];
  /**  */
  "assetType"?: OrAttributeInput['assetType'];
  /**  */
  "label"?: OrAttributeInput['label'];
  /**  */
  "disabled"?: OrAttributeInput['disabled'];
  /**  */
  "readonly"?: OrAttributeInput['readonly'];
  /**  */
  "required"?: OrAttributeInput['required'];
  /**  */
  "value"?: OrAttributeInput['value'];
  /**  */
  "inputType"?: OrAttributeInput['inputType'];
  /**  */
  "hasHelperText"?: OrAttributeInput['hasHelperText'];
  /**  */
  "disableButton"?: OrAttributeInput['disableButton'];
  /**  */
  "disableSubscribe"?: OrAttributeInput['disableSubscribe'];
  /**  */
  "disableWrite"?: OrAttributeInput['disableWrite'];
  /**  */
  "compact"?: OrAttributeInput['compact'];
  /**  */
  "comfortable"?: OrAttributeInput['comfortable'];
  /**  */
  "resizeVertical"?: OrAttributeInput['resizeVertical'];
  /**  */
  "fullWidth"?: OrAttributeInput['fullWidth'];
  /**  */
  "rounded"?: OrAttributeInput['rounded'];
  /**  */
  "outlined"?: OrAttributeInput['outlined'];
  /**  */
  "_attributeEvent"?: OrAttributeInput['_attributeEvent'];
  /**  */
  "_writeTimeoutHandler"?: OrAttributeInput['_writeTimeoutHandler'];
  /**  */
  "customProvider"?: OrAttributeInput['customProvider'];
  /**  */
  "writeTimeout"?: OrAttributeInput['writeTimeout'];
  /**  */
  "langChangedCallback"?: OrAttributeInput['langChangedCallback'];

  /**  */
  "onnewValue"?: (e: CustomEvent<OrAttributeInputChangedEvent>) => void;
}

  export type CustomElements = {


  /**
     * 
 * 
 * ## Attributes & Properties
 * 
 * Component attributes and properties that can be applied to the element or by using JavaScript.
 * 
 * - `attribute`: undefined 
 * - `assetId`: undefined 
 * - `attributeDescriptor`: undefined 
 * - `valueDescriptor`: undefined 
 * - `assetType`: undefined 
 * - `label`: undefined 
 * - `disabled`: undefined 
 * - `readonly`: undefined 
 * - `required`: undefined 
 * - `value`: undefined 
 * - `inputType`: undefined 
 * - `hasHelperText`: undefined 
 * - `disableButton`: undefined 
 * - `disableSubscribe`: undefined 
 * - `disableWrite`: undefined 
 * - `compact`: undefined 
 * - `comfortable`: undefined 
 * - `resizeVertical`: undefined 
 * - `fullWidth`: undefined 
 * - `rounded`: undefined 
 * - `outlined`: undefined 
 * - `_attributeEvent`: undefined 
 * - `_writeTimeoutHandler`: undefined 
 * - `customProvider`: undefined (property only)
 * - `writeTimeout`: undefined (property only)
 * - `langChangedCallback`: undefined (property only)
 * 
 * ## Events
 * 
 * Events that will be emitted by the component.
 * 
 * - `newValue`: undefined
 * 
 * ## Methods
 * 
 * Methods that can be called to access component functionality.
 * 
 * - `getLabel() => string | undefined`: undefined
 * - `isReadonly() => boolean`: undefined
 * - `_onEvent(event: SharedEvent) => void`: This is called by asset-mixin
 * - `checkValidity() => boolean`: undefined
  */
    "or-attribute-input": Partial<OrAttributeInputProps & BaseProps<OrAttributeInput> & BaseEvents>;
  }

export type CustomCssProperties = {

}


declare module 'react' {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}

declare module 'preact' {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}

declare module '@builder.io/qwik' {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}

declare module '@stencil/core' {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}

declare module 'hono/jsx' {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}

declare module 'react-native' {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}

declare global {
  namespace JSX {
    interface IntrinsicElements extends CustomElements {}
  }
  export interface CSSProperties extends CustomCssProperties {}
}
