/* CorejamPluginAuth custom elements bundle */

import type { Components, JSX } from "../types/components";

interface AuthAccount extends Components.AuthAccount, HTMLElement {}
export const AuthAccount: {
  prototype: AuthAccount;
  new (): AuthAccount;
};

interface AuthAdminUserForm extends Components.AuthAdminUserForm, HTMLElement {}
export const AuthAdminUserForm: {
  prototype: AuthAdminUserForm;
  new (): AuthAdminUserForm;
};

interface AuthAdminUserList extends Components.AuthAdminUserList, HTMLElement {}
export const AuthAdminUserList: {
  prototype: AuthAdminUserList;
  new (): AuthAdminUserList;
};

interface AuthFormLogin extends Components.AuthFormLogin, HTMLElement {}
export const AuthFormLogin: {
  prototype: AuthFormLogin;
  new (): AuthFormLogin;
};

interface AuthFormRegister extends Components.AuthFormRegister, HTMLElement {}
export const AuthFormRegister: {
  prototype: AuthFormRegister;
  new (): AuthFormRegister;
};

interface AuthHeader extends Components.AuthHeader, HTMLElement {}
export const AuthHeader: {
  prototype: AuthHeader;
  new (): AuthHeader;
};

interface AuthLayout extends Components.AuthLayout, HTMLElement {}
export const AuthLayout: {
  prototype: AuthLayout;
  new (): AuthLayout;
};

interface AuthReset extends Components.AuthReset, HTMLElement {}
export const AuthReset: {
  prototype: AuthReset;
  new (): AuthReset;
};

interface AuthResetPasswordForm extends Components.AuthResetPasswordForm, HTMLElement {}
export const AuthResetPasswordForm: {
  prototype: AuthResetPasswordForm;
  new (): AuthResetPasswordForm;
};

interface AuthRouteAccount extends Components.AuthRouteAccount, HTMLElement {}
export const AuthRouteAccount: {
  prototype: AuthRouteAccount;
  new (): AuthRouteAccount;
};

interface AuthRouteAdmin extends Components.AuthRouteAdmin, HTMLElement {}
export const AuthRouteAdmin: {
  prototype: AuthRouteAdmin;
  new (): AuthRouteAdmin;
};

interface AuthRouteAdminIndex extends Components.AuthRouteAdminIndex, HTMLElement {}
export const AuthRouteAdminIndex: {
  prototype: AuthRouteAdminIndex;
  new (): AuthRouteAdminIndex;
};

interface AuthRouteAdminUserForm extends Components.AuthRouteAdminUserForm, HTMLElement {}
export const AuthRouteAdminUserForm: {
  prototype: AuthRouteAdminUserForm;
  new (): AuthRouteAdminUserForm;
};

interface AuthRouteIndex extends Components.AuthRouteIndex, HTMLElement {}
export const AuthRouteIndex: {
  prototype: AuthRouteIndex;
  new (): AuthRouteIndex;
};

interface AuthRouteLogin extends Components.AuthRouteLogin, HTMLElement {}
export const AuthRouteLogin: {
  prototype: AuthRouteLogin;
  new (): AuthRouteLogin;
};

interface AuthRouteRegister extends Components.AuthRouteRegister, HTMLElement {}
export const AuthRouteRegister: {
  prototype: AuthRouteRegister;
  new (): AuthRouteRegister;
};

interface AuthRouteReset extends Components.AuthRouteReset, HTMLElement {}
export const AuthRouteReset: {
  prototype: AuthRouteReset;
  new (): AuthRouteReset;
};

interface AuthRouteVerify extends Components.AuthRouteVerify, HTMLElement {}
export const AuthRouteVerify: {
  prototype: AuthRouteVerify;
  new (): AuthRouteVerify;
};

interface AuthVerify extends Components.AuthVerify, HTMLElement {}
export const AuthVerify: {
  prototype: AuthVerify;
  new (): AuthVerify;
};

interface CorejamIconsAccount extends Components.CorejamIconsAccount, HTMLElement {}
export const CorejamIconsAccount: {
  prototype: CorejamIconsAccount;
  new (): CorejamIconsAccount;
};

interface CorejamIdentity extends Components.CorejamIdentity, HTMLElement {}
export const CorejamIdentity: {
  prototype: CorejamIdentity;
  new (): CorejamIdentity;
};

/**
 * Utility to define all custom elements within this package using the tag name provided in the component's source. 
 * When defining each custom element, it will also check it's safe to define by:
 *
 * 1. Ensuring the "customElements" registry is available in the global context (window).
 * 2. The component tag name is not already defined.
 *
 * Use the standard [customElements.define()](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define) 
 * method instead to define custom elements individually, or to provide a different tag name.
 */
export declare const defineCustomElements: (opts?: any) => void;

/**
 * Used to manually set the base path where assets can be found.
 * If the script is used as "module", it's recommended to use "import.meta.url",
 * such as "setAssetPath(import.meta.url)". Other options include
 * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
 * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
 * But do note that this configuration depends on how your script is bundled, or lack of
 * bunding, and where your assets can be loaded from. Additionally custom bundling
 * will have to ensure the static assets are copied to its build directory.
 */
export declare const setAssetPath: (path: string) => void;

export interface SetPlatformOptions {
  raf?: (c: FrameRequestCallback) => number;
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
  ce?: (eventName: string, opts?: any) => CustomEvent;
}
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;

export type { Components, JSX };

export * from '../types';
