import type { CustomDirective } from './types';
/**
 * Create an stx application instance.
 *
 * ```ts
 * import { createApp } from '@stacksjs/stx'
 *
 * const app = createApp()
 *
 * app.use(myPlugin)
 * app.provide('theme', 'dark')
 * app.component('MyButton', MyButton)
 * app.mount('#app')
 * ```
 *
 * @param rootComponent - Optional root component definition
 * @param rootProps - Optional props for the root component
 */
export declare function createApp(_rootComponent?: any, _rootProps?: Record<string, any>): StxApp;
/**
 * Define a custom element from a component definition.
 *
 * Wraps the component as an HTMLElement subclass suitable for
 * `customElements.define()`.
 *
 * ```ts
 * import { defineCustomElement } from '@stacksjs/stx'
 * import MyComponent from './MyComponent.stx'
 *
 * const MyElement = defineCustomElement(MyComponent)
 * customElements.define('my-component', MyElement)
 * ```
 */
export declare function defineCustomElement(component: any): CustomElementConstructor;
/** A Vue-compatible plugin with install method */
export declare interface StxAppPlugin {
  install: (app: StxApp, ...options: any[]) => void
}
/** The stx application instance */
export declare interface StxApp {
  use(plugin: StxPluginInput, ...options: any[]): StxApp
  provide<T>(key: string | symbol, value: T): StxApp
  component(name: string, definition?: any): StxApp | any
  directive(name: string, definition?: CustomDirective | Record<string, any>): StxApp | any
  mount(rootContainer?: string | Element): StxApp
  unmount(): void
  config: StxAppConfig
  _components: Map<string, any>
  _directives: Map<string, any>
  _installedPlugins: Set<StxPluginInput>
}
/** Application configuration */
export declare interface StxAppConfig {
  errorHandler?: (error: Error, instance: any, info: string) => void
  warnHandler?: (msg: string, instance: any, trace: string) => void
  globalProperties: Record<string, any>
  performance: boolean
  compilerOptions: {
    isCustomElement?: (tag: string) => boolean
    whitespace?: 'condense' | 'preserve'
  }
}
/** Plugin can be an object with install() or a plain function */
// eslint-disable-next-line pickier/no-unused-vars
export type StxPluginInput = StxAppPlugin | ((app: StxApp, ...options: any[]) => void);
