import type * as icons from "@esri/calcite-ui-icons";
import type { KebabCase } from "type-fest";

export type IconName = KebabCaseIcons | CamelCaseIcons;

export type CamelCaseIcons = ExtractBaseIcon<keyof typeof icons>;

export type KebabCaseIcons = KebabCase<CamelCaseIcons>;

export type ExtractBaseIcon<T> = T extends `${infer Base}${"16" | "24" | "32"}F` ? `${Base}F` : T extends `${infer Base}F` ? `${Base}F` : T extends `${infer Base}${"16" | "24" | "32"}` ? Base : never;