import type { StxOptions } from './types';
/**
 * Convert PascalCase to kebab-case with proper handling of consecutive uppercase letters.
 *
 * Examples:
 * - `UserCard` → `user-card`
 * - `XMLParser` → `xml-parser` (not `x-m-l-parser`)
 * - `HTMLElement` → `html-element`
 * - `MyURLParser` → `my-url-parser`
 * - `IOStream` → `io-stream`
 *
 * The algorithm:
 * 1. Insert hyphen before uppercase letters that follow lowercase letters
 * 2. Insert hyphen before the last uppercase in a sequence of uppercase letters (before lowercase)
 * 3. Convert to lowercase
 */
export declare function pascalToKebab(str: string): string;
/**
 * Find component tags in HTML, properly handling quoted strings
 * This solves the issue where `>` inside attribute values would incorrectly end the tag
 *
 * @param html - The HTML string to search
 * @param tagPattern - Regex pattern for tag name (for PascalCase components)
 * @param skipTags - Optional set of tag names to skip (for HTML tags)
 * @returns Array of found component tags
 */
export declare function findComponentTags(html: string, tagPattern: RegExp, skipTags?: Set<string>): ComponentTagMatch[];
/**
 * Parse multiline attributes from a component tag
 * Handles HTML content inside attribute values correctly
 *
 * @param attributesStr - The attributes string (may be multiline)
 * @returns Object mapping attribute names to values
 */
export declare function parseMultilineAttributes(attributesStr: string): Record<string, string>;
export declare function parseAttributes(attributesStr: string): ParsedAttribute[];
/**
 * Process built-in STX components like <stx-loading-indicator>
 */
export declare function processBuiltInComponents(template: string, _context: Record<string, any>, _filePath: string, _options: StxOptions): Promise<string>;
/**
 * Process @import directives for explicit component imports.
 *
 * Syntax:
 *   @import('components/Card')
 *   @import('ui/Button', 'ui/Modal')
 *   @import('Card', 'Button', 'Modal')
 *
 * This allows explicit importing of components from any path,
 * overriding the auto-import from the components directory.
 */
export declare function processImportDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions, dependencies: Set<string>): Promise<string>;
/**
 * Process @component directives
 */
export declare function processComponentDirectives(template: string, context: Record<string, any>, filePath: string, componentsDir: string, options: StxOptions, dependencies: Set<string>): Promise<string>;
/**
 * Process custom element components (both kebab-case and PascalCase)
 * Uses a proper parser that handles HTML content inside attribute values
 */
export declare function processCustomElements(template: string, context: Record<string, any>, filePath: string, componentsDir: string, options: StxOptions, dependencies: Set<string>): Promise<string>;
/**
 * Parse HTML/JSX-like attributes from a string.
 *
 * Properly handles:
 * - Simple attributes: `name="value"`
 * - Boolean attributes: `disabled`
 * - Dynamic values: `prop="{{ expr }}"` (evaluated at SSR)
 * - Attributes with `=` in values: `url="https://example.com?a=1&b=2"`
 * - Single and double quoted values
 * - Escaped quotes within values
 *
 * ## Dynamic Data Syntax
 *
 * Use `{{ }}` for all dynamic data interpolation:
 * ```html
 * <Component title="{{ pageTitle }}" count="{{ items.length }}" />
 * <div class="{{ isActive ? 'active' : '' }}">{{ content }}</div>
 * ```
 *
 * ## Event Syntax (Alpine-style)
 *
 * ```html
 * <button @click="handleClick()">Click me</button>
 * <form @submit.prevent="handleSubmit()">...</form>
 * <input @keydown.enter="send()" @keydown.escape="cancel()">
 * ```
 *
 * @param attributesStr - The attributes portion of a tag (between tag name and closing)
 * @returns Array of parsed attributes with name and value
 */
export declare interface ParsedAttribute {
  name: string
  value: string | true
}
/**
 * Component tag match result
 */
export declare interface ComponentTagMatch {
  fullMatch: string
  tagName: string
  attributes: string
  content: string
  startIndex: number
  endIndex: number
  isSelfClosing: boolean
}
