import * as _angular_core from '@angular/core'; import { InjectionToken, EnvironmentProviders } from '@angular/core'; import { Size } from '@sdcorejs/utils/models'; import { SdIconSet, SdMaterialIconSet } from '@sdcorejs/angular/utilities/models'; export { SdIconSet, SdMaterialIconSet } from '@sdcorejs/angular/utilities/models'; import { LucideConfig, LucideIcon, LucideIconData } from '@lucide/angular'; /** @deprecated Use `SdIconSet` instead. */ type SdIconFontSet = SdIconSet; /** * Một icon Lucide có thể đăng ký bằng class icon Angular hoặc dữ liệu path thuần. */ type SdLucideIconRegistration = LucideIcon | LucideIconData; /** * Danh sách đăng ký Lucide cho provider, hỗ trợ cả array và object map để app có thể giữ cấu trúc import riêng. */ type SdLucideIconRegistrations = SdLucideIconRegistration[] | Record; /** * Cấu hình app-level cho `SdIcon`. * * Các alias tách riêng theo renderer để app có thể giữ tên Material trong template trong lúc chuyển dần sang Lucide. */ interface ISdIconConfiguration { /** Default icon font set when component does not pass `fontSet`. */ defaultFontSet?: SdIconSet; /** Alias áp dụng khi renderer hiện tại là Material. */ materialAliases?: Record; /** Alias áp dụng khi renderer hiện tại là Lucide. */ lucideAliases?: Record; /** Cấu hình stroke toàn cục cho Lucide SVG. */ lucideConfig?: Partial; /** Icon Lucide cần đăng ký vào `@lucide/angular`. */ lucideIcons?: SdLucideIconRegistrations; } /** * Cấu hình đã resolve đầy đủ để component không phải tự xử lý fallback nhiều lần. */ type ISdIconResolvedConfiguration = Required>; /** * Quy đổi token `Size` chung của SDCoreJS sang pixel cho icon. */ declare const SD_ICON_SIZE_MAP: Record; /** * Alias mặc định giúp template giữ tên Material trong khi renderer có thể là Lucide. */ declare const SD_DEFAULT_LUCIDE_ALIASES: Record; /** * Alias mac dinh giup template dung ten Lucide van render duoc khi quay ve Material font. */ declare const SD_DEFAULT_MATERIAL_ALIASES: Record; /** * Cấu hình mặc định của Core UI icon. * * `material-icons-outlined` được giữ làm mặc định để không đổi visual của các component Material hiện có. */ declare const SD_ICON_DEFAULT_CONFIG: ISdIconResolvedConfiguration; /** * Facade icon dùng chung cho Core UI. * * Component này giữ template app theo tên icon ổn định, còn renderer có thể đổi giữa Material font và Lucide SVG qua provider hoặc input. */ declare class SdIcon { private readonly config; /** * Tên icon theo namespace hiện tại. * * Khi `set` là `lucide`, tên này sẽ đi qua alias để app có thể tiếp tục dùng tên Material trong template. */ name: _angular_core.InputSignalWithTransform; fontIcon: _angular_core.InputSignalWithTransform; color: _angular_core.InputSignalWithTransform; /** * Renderer icon của riêng instance này. * * Deprecated alias for `fontSet`. */ set: _angular_core.InputSignalWithTransform; /** * Escape hatch cho Material icon font set. * * Prefer this input for both Material font families and Lucide SVG icons. */ fontSet: _angular_core.InputSignalWithTransform; /** * Kích thước icon theo token SDCoreJS hoặc CSS size tùy biến. * * Token `sm | md | lg` giữ icon đồng bộ với các component Core UI; CSS string xử lý các ngoại lệ layout. */ size: _angular_core.InputSignalWithTransform; /** * Độ dày stroke riêng cho Lucide SVG. * * Bỏ trống để nhận giá trị từ `lucideConfig` app-level. */ strokeWidth: _angular_core.InputSignalWithTransform; /** * Giữ stroke width tuyệt đối cho Lucide khi SVG đổi kích thước. * * Input này đi qua `booleanAttribute` để hỗ trợ cả attribute trần trong template. */ absoluteStrokeWidth: _angular_core.InputSignalWithTransform; /** * Nhãn truy cập cho icon có ý nghĩa. * * Khi không có nhãn, component tự đánh dấu decorative bằng `aria-hidden`. */ ariaLabel: _angular_core.InputSignalWithTransform; /** * Set icon cuối cùng sau khi áp dụng input và provider. * * @returns renderer hiện tại của component. */ resolvedFontSet: _angular_core.Signal; /** @deprecated Use `resolvedFontSet` instead. */ resolvedSet: _angular_core.Signal; /** * Tên icon cuối cùng theo renderer hiện tại. * * @returns tên icon đã áp alias nếu renderer yêu cầu. */ resolvedName: _angular_core.Signal; /** * Font set Material cuối cùng. * * @returns font set dùng cho `mat-icon`; với Lucide trả về fallback Material để computed luôn có type ổn định. */ resolvedMaterialFontSet: _angular_core.Signal; /** * Kích thước runtime cho renderer hiện tại. * * @returns số pixel cho token chuẩn hoặc CSS string nguyên bản cho custom size. */ resolvedSize: _angular_core.Signal; /** * Kích thước CSS cuối cùng cho host element. * * @returns CSS length dùng cho custom property `--sd-icon-size`. */ resolvedCssSize: _angular_core.Signal; /** * Stroke width cuối cùng cho Lucide SVG. * * @returns giá trị input instance hoặc fallback từ provider. */ resolvedStrokeWidth: _angular_core.Signal; /** * Absolute stroke width cuối cùng cho Lucide SVG. * * @returns giá trị input instance hoặc fallback từ provider. */ resolvedAbsoluteStrokeWidth: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Injection token chứa cấu hình icon đã resolve cho toàn bộ app. * * Token có factory mặc định để `SdIcon` vẫn chạy khi app chưa gọi `provideSdIcon`. */ declare const SD_ICON_CONFIGURATION: InjectionToken>>; /** * Đăng ký cấu hình icon Core UI ở app-level. * * Provider này gom cả cấu hình `SdIcon` và registry của `@lucide/angular` để consumer chỉ cần gọi một hàm. * * @param config - cấu hình app-level cho Material/Lucide icon. * @returns environment providers dùng được trong `ApplicationConfig.providers`. */ declare function provideSdIcon(config?: ISdIconConfiguration): EnvironmentProviders; /** * Resolve cấu hình `SdIcon` thành object đầy đủ, không còn field optional. * * Alias mặc định đứng trước để app có thể override từng key mà không phải copy toàn bộ bảng alias. * * @param config - cấu hình rời rạc từ consumer hoặc mặc định rỗng. * @returns cấu hình đầy đủ dùng trực tiếp trong component. */ declare function resolveSdIconConfig(config?: ISdIconConfiguration): ISdIconResolvedConfiguration; /** * Chuẩn hóa nhiều kiểu khai báo Lucide icon về array cho `provideLucideIcons`. * * @param registrations - array hoặc object map icon Lucide từ consumer. * @returns danh sách icon Lucide đã sẵn sàng để spread vào provider của Lucide. */ declare function normalizeSdLucideIcons(registrations?: SdLucideIconRegistrations): SdLucideIconRegistration[]; export { SD_DEFAULT_LUCIDE_ALIASES, SD_DEFAULT_MATERIAL_ALIASES, SD_ICON_CONFIGURATION, SD_ICON_DEFAULT_CONFIG, SD_ICON_SIZE_MAP, SdIcon, normalizeSdLucideIcons, provideSdIcon, resolveSdIconConfig }; export type { ISdIconConfiguration, ISdIconResolvedConfiguration, SdIconFontSet, SdLucideIconRegistration, SdLucideIconRegistrations };