import * as react_jsx_runtime from 'react/jsx-runtime';
import { LucideIcon } from 'lucide-react';
import { b as TreeNode, g as TreeRowSlot } from '../types-eEu8SeiQ.js';
import 'react';

interface ResolveFolderIconOptions {
    /** Folder display name (no path). */
    name: string;
    /** Open / closed state — only used for the *generic* folder fallback. */
    isExpanded?: boolean;
    /**
     * Optional override map. Wins over the built-in table. Keys are
     * matched case-insensitively after `trim()`.
     */
    overrides?: Record<string, LucideIcon>;
}
/**
 * Pick the right folder icon for `name`. Returns `Folder` / `FolderOpen`
 * for unknown names so callers can render the generic open/closed pair.
 */
declare function resolveFolderIcon({ name, isExpanded, overrides, }: ResolveFolderIconOptions): LucideIcon;
type FolderIconOverrides = Record<string, LucideIcon>;

type FileIconSize = 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 64;
interface FileIconProps {
    /** File name (with extension) or folder name. */
    name: string;
    /** Render a folder icon instead of a file icon. */
    isFolder?: boolean;
    /** Folder open / closed state. Ignored when `isFolder` is false. */
    isExpanded?: boolean;
    /** Pixel size of the icon. */
    size?: FileIconSize;
    /**
     * Override or extend the built-in special-folder mapping. Keys are
     * matched case-insensitively. Only used when `isFolder` is true.
     */
    folderOverrides?: FolderIconOverrides;
    /**
     * Accessible label. When omitted the icon is decorative (`aria-hidden`) —
     * correct when it sits next to a visible file name. Pass a string to
     * expose the icon to assistive technology.
     */
    label?: string;
    className?: string;
}
/**
 * VSCode-style file icon.
 *
 * - Folders render Lucide `Folder` / `FolderOpen` (warning-token tint).
 * - Files render rich, colourful SVGs vendored from `material-file-icons`
 *   (MIT). Resolution is synchronous — no runtime dependency, no async load.
 *
 * The icon SVG data is a static module, so it bundles into the `FileIcon`
 * chunk and is only fetched by consumers that actually mount this component.
 */
declare function FileIcon({ name, isFolder, isExpanded, size, folderOverrides, label, className, }: FileIconProps): react_jsx_runtime.JSX.Element;

interface CreateFileIconSlotOptions<T> {
    /**
     * How to read the displayed name (with extension) for a node. Use the same
     * accessor you pass to `<TreeRoot getItemName={...} />`.
     */
    getName: (node: TreeNode<T>) => string;
    /** Pixel size for both file and folder icons. Default: 16. */
    size?: FileIconSize;
    /**
     * Override or extend the built-in special-folder mapping (e.g. give
     * `tests` a custom icon). Keys are matched case-insensitively.
     */
    folderOverrides?: FolderIconOverrides;
}
/**
 * Build a `renderIcon` slot for `<TreeRoot>` that uses `<FileIcon>` for both
 * leaves and folders.
 *
 * @example
 * ```tsx
 * <TreeRoot
 *   data={data}
 *   getItemName={(n) => n.data.name}
 *   renderIcon={createFileIconSlot({ getName: (n) => n.data.name })}
 * />
 * ```
 */
declare function createFileIconSlot<T>({ getName, size, folderOverrides, }: CreateFileIconSlotOptions<T>): TreeRowSlot<T>;

/**
 * Icon SVGs vendored from material-file-icons (MIT) —
 * https://github.com/simonnilsson/material-file-icons
 *
 * Auto-generated static data module. Do not edit by hand.
 * Re-extract with getAllIcons() if upgrading the upstream package.
 */
interface FileIconDef {
    /** Stable icon name (e.g. "html", "typescript"). */
    name: string;
    /** Raw inline SVG markup. Static vendored asset — safe to render. */
    svg: string;
    /** Lowercase extensions (no dot) this icon matches. */
    extensions?: string[];
    /** Full lowercase filenames this icon matches exactly. */
    files?: string[];
}
declare const DEFAULT_FILE_ICON: FileIconDef;

/**
 * Resolver for VSCode-style file icons. Replaces the former optional
 * `material-file-icons` runtime dependency — the icon SVGs are now vendored
 * as a static data module (`./icons/icon-data`), so the bundler resolves them
 * deterministically with no dynamic `import()` and no `@vite-ignore`.
 *
 * Lookup matches the original `material-file-icons` algorithm:
 *   1. exact full-name match (`files[]`, lowercased)
 *   2. longest matching extension (`name.endsWith('.' + ext)`)
 *   3. fall back to the default file icon
 *
 * The `files` / `extensions` lookup maps are built lazily on first call.
 */

/**
 * Resolve the icon definition for a file name. Always returns a definition —
 * unknown types yield {@link DEFAULT_FILE_ICON}.
 */
declare function getFileIcon(filename: string): FileIconDef;

/** Returns an inline SVG string for a file name, or `undefined`. */
type GetIconFn = (name: string) => {
    svg?: string;
} | undefined;
/** @deprecated Use {@link getFileIcon} — resolution is now synchronous. */
declare function loadMaterialIcons(): Promise<GetIconFn>;
/** @deprecated Use {@link getFileIcon} — resolution is now synchronous. */
declare function getMaterialIconsSync(): GetIconFn;

export { type CreateFileIconSlotOptions, DEFAULT_FILE_ICON, FileIcon, type FileIconDef, type FileIconProps, type FileIconSize, type FolderIconOverrides, type ResolveFolderIconOptions, createFileIconSlot, getFileIcon, getMaterialIconsSync, loadMaterialIcons, resolveFolderIcon };
