import * as react_jsx_runtime from 'react/jsx-runtime';
import { LucideIcon } from 'lucide-react';
import { T as TreeNode, a as TreeRowSlot } from '../types-CevSbyfD.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;
    className?: string;
}
/**
 * VSCode-style file icon.
 *
 * - Folders render Lucide `Folder` / `FolderOpen` (amber tint).
 * - Files use `material-file-icons` if it's installed in the consumer; otherwise
 *   fall back to a neutral Lucide `File` icon.
 *
 * The optional dependency is loaded lazily on first render — there is zero
 * bundle cost for consumers who never mount this component.
 */
declare function FileIcon({ name, isFolder, isExpanded, size, folderOverrides, 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>;

/**
 * Lazy loader for `material-file-icons`. The package is an optional dependency:
 * if it's installed in the consumer's tree, we render its rich VSCode-style
 * SVGs; if not, the loader resolves to `null` and `<FileIcon>` falls back to a
 * Lucide icon. Either way, ui-tools never throws or warns about a missing
 * package.
 *
 * Resolution is cached per-process so we don't re-import on every render.
 */
type GetIconFn = (name: string) => {
    svg: string;
} | undefined;
declare function loadMaterialIcons(): Promise<GetIconFn | null>;
/** Synchronous accessor — returns null until `loadMaterialIcons` resolves. */
declare function getMaterialIconsSync(): GetIconFn | null;

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