import type { IfExtends } from "hry-types/src/Any/IfExtends"; import type { Func } from "hry-types/src/Misc/Func"; import type { WMComponent, WMCompPageLifetimes, WMPageLifetimes } from "../../types/OfficialTypeAlias"; import type { LifetimesConstraint } from "../RootComponent/Lifetimes/LifetimesConstraint"; import type { RootComponentDoc } from "../RootComponent/RootComponentDoc"; import type { SubComponentDoc } from "../SubComponent/SubComponentDoc"; import type { NameOrPageOption as NameOrPathOption } from "./NameOrPage/NameOrPathOption"; import type { CreateComponentDoc } from "./ReturnType/CreateComponentDoc"; import type { CreatePageDoc } from "./ReturnType/CreatePageDoc"; import type { RootComponentOption } from "./RootComponent/RootComponentOption"; import type { SubComponentsOption } from "./SubComponents/SubComponentsOption"; type RootOptions = NameOrPathOption & RootComponentOption & SubComponentsOption; interface DefineComponentConstructor { (options: RootOptions): IfExtends<"", TName, CreatePageDoc, CreateComponentDoc>; } export type FuncConfig = { pageLifetimes?: Record; lifetimes?: Record; watch?: Record; }; export type ComponentOptions = { isPage?: boolean; options?: WMComponent.Options; properties?: object; data?: object; store?: object; computed?: Record; observers?: Record; behaviors?: string[]; methods?: Record & { __storeConfig__?: Func; }; watch?: Record; lifetimes?: LifetimesConstraint; pageLifetimes?: Partial; }; export type Path = `/${string}`; export type DefineComponentOptions = { path?: Path; name?: string; rootComponent?: RootComponentDoc; subComponents?: SubComponentDoc[]; }; export declare const DefineComponent: DefineComponentConstructor; export type PageOptions = { path: Path; rootComponent: RootComponentDoc & { isPage: true; }; subComponents: SubComponentDoc[]; }; export type CompOptions = { name: string; rootComponent: RootComponentDoc & { isPage: undefined; }; subComponents: SubComponentDoc[]; }; export {};