{"version":3,"file":"qualcomm-ui-angular-core-lucide.mjs","sources":["../../src/lucide/lucide.types.ts","../../src/lucide/provide-icons.ts","../../src/lucide/qualcomm-ui-angular-core-lucide.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\ntype HtmlAttributes = {\n  [key: string]: string | number\n}\ntype LucideIconNode = readonly [string, HtmlAttributes]\ntype LucideIconData = readonly LucideIconNode[]\n\ntype SvgAttributes = {[key: string]: string | number}\n\nexport type LucideIconArrayData = readonly [string, SvgAttributes]\n\n// https://github.com/lucide-icons/lucide/issues/1735\nexport type LucideIconCompat = readonly [\n  string,\n  SvgAttributes,\n  LucideIconNode[]?,\n]\n\nexport type LucideIconPart = LucideIconNode\nexport type LucideIcon = LucideIconData\n\n/**\n * The imported LucideIcon or a string. The string form of the icon works with the\n * provider approach:\n *\n * @example\n * ```ts\n * import {IconDirective} from '@qualcomm-ui/angular/icon'\n * import {provideIcons} from '@qualcomm-ui/angular-core/lucide'\n * import {Search} from 'lucide-angular'\n * ```\n *\n * @Component({\n *   imports: [IconDirective],\n *   providers: [provideIcons({Search})],\n *   template: `\n *     <svg qIcon=\"Search\"></svg>\n *   `\n * })\n * class ExampleComponent {}\n * ```\n */\nexport type LucideIconOrString = LucideIcon | string\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {inject, InjectionToken, type StaticProvider} from \"@angular/core\"\n\nimport type {LucideIcon} from \"./lucide.types\"\n\nexport type LucideIconProviderValue = Record<string, LucideIcon>\n\nexport const LUCIDE_ICONS = new InjectionToken<LucideIconProviderValue>(\n  \"LUCIDE_ICONS\",\n)\n\nexport function provideIcons(icons: Record<string, LucideIcon>) {\n  return {\n    provide: LUCIDE_ICONS,\n    useFactory: () => {\n      const parent: LucideIconProviderValue | null = inject(LUCIDE_ICONS, {\n        optional: true,\n        skipSelf: true,\n      })\n      if (!parent) {\n        return icons\n      }\n      return {...parent, ...icons}\n    },\n  } satisfies StaticProvider\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AACA;;ACDA;AACA;MAQa,YAAY,GAAG,IAAI,cAAc,CAC5C,cAAc;AAGV,SAAU,YAAY,CAAC,KAAiC,EAAA;IAC5D,OAAO;AACL,QAAA,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,MAAK;AACf,YAAA,MAAM,MAAM,GAAmC,MAAM,CAAC,YAAY,EAAE;AAClE,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC;YACF,IAAI,CAAC,MAAM,EAAE;AACX,gBAAA,OAAO,KAAK;YACd;AACA,YAAA,OAAO,EAAC,GAAG,MAAM,EAAE,GAAG,KAAK,EAAC;QAC9B,CAAC;KACuB;AAC5B;;AC3BA;;AAEG;;;;"}