import { type PartialWithNullable } from '@augment-vir/common'; import { type CustomElementTagName } from './custom-tag-name.js'; import { type DeclarativeElementInit } from './declarative-element-init.js'; import { type DeclarativeElementInputErrorParams } from './define-element.js'; import { type EventsInitMap } from './properties/element-events.js'; import { type PropertyInitMapBase } from './properties/element-properties.js'; import { type BaseStringName } from './properties/string-names.js'; /** * Options for {@link wrapDefineElement}. * * @category Internal */ export type WrapDefineElementOptions = PartialWithNullable<{ /** * An optional callback which asserts that an element definition init object given to the * wrapped element definition functions is valid. */ assertInputs: (inputInit: DeclarativeElementInit, BaseStringName, ReadonlyArray, ReadonlyArray>) => void; /** * An optional callback which transforms a element definition init object given to the wrapped * element definition. */ transformInputs: (inputInit: DeclarativeElementInit, BaseStringName, ReadonlyArray, ReadonlyArray>) => DeclarativeElementInit, BaseStringName, ReadonlyArray, ReadonlyArray>; }>; /** * Wraps {@link defineElement} in a superset of requirements. For example: * * - You could create element definition functions that require all elements to start with a common * prefix, like `vir-`. * - You could create element definition functions that require all elements to have _at least_ a * specified set of input properties. * - Etc. * * @category Element Definition */ export declare function wrapDefineElement(options?: WrapDefineElementOptions | undefined): (...errorParams: DeclarativeElementInputErrorParams) => = `${TagName}-`, const CssVarKeys extends BaseStringName = `${TagName}-`, const SlotNames extends ReadonlyArray = Readonly<[]>, const TestIds extends ReadonlyArray = Readonly<[]>>(inputs: DeclarativeElementInit) => import("./declarative-element.js").DeclarativeElementDefinition;