import { TemplateResult } from "lit";

//#region src/gui/tree/treeContext.d.ts

/**
 * Generic tree item data structure.
 * Used by ef-tree for data-driven tree rendering.
 */
interface TreeItem {
  /** Unique identifier for this item */
  id: string;
  /** Display label */
  label: string;
  /** Optional icon (Lit TemplateResult or string) */
  icon?: TemplateResult | string;
  /** Child items (folders have children, leaves don't) */
  children?: TreeItem[];
  /** Arbitrary payload data */
  data?: unknown;
}
/**
 * Tree component state
 */
interface TreeState {
  /** Currently selected item ID */
  selectedId: string | null;
  /** Set of expanded item IDs */
  expandedIds: Set<string>;
}
/**
 * Tree component actions
 */
interface TreeActions {
  /** Select an item by ID */
  select: (id: string | null) => void;
  /** Toggle an item's expanded state */
  toggleExpanded: (id: string) => void;
  /** Set an item's expanded state explicitly */
  setExpanded: (id: string, expanded: boolean) => void;
}
/**
 * Tree context provided to tree items
 */
interface TreeContext {
  state: TreeState;
  actions: TreeActions;
}
/**
 * Lit context for tree components
 */
declare const treeContext: {
  __context__: TreeContext;
};
/**
 * Helper to collect all item IDs from a tree (for default expanded state)
 */
declare function collectAllIds(items: TreeItem[]): Set<string>;
//#endregion
export { TreeActions, TreeContext, TreeItem, TreeState, collectAllIds, treeContext };
//# sourceMappingURL=treeContext.d.ts.map