import * as _angular_core from '@angular/core'; import { InputSignal, InputSignalWithTransform, ElementRef } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/icon'; import * as i3 from 'ngx-tethys/tooltip'; import { ThumbAnimationProps } from 'ngx-tethys/core'; import { SafeAny } from 'ngx-tethys/types'; import { ThyBooleanInput } from 'ngx-tethys/util'; import { AnimationEvent } from '@angular/animations'; interface IThySegmentItemComponent { elementRef: ElementRef; thyValue: SafeAny; unselect: () => void; select: () => void; } interface IThySegmentComponent { thyMode: InputSignal; thyDisabled: InputSignalWithTransform | InputSignal; selectedItem: IThySegmentItemComponent | null; changeSelectedItem: (item: IThySegmentItemComponent, event?: Event) => void; } /** * 分段控制器的选项组件 * @name thy-segment-item,[thy-segment-item] */ declare class ThySegmentItem implements IThySegmentItemComponent { elementRef: ElementRef; private ngZone; private renderer; private parent; /** * 选项的值 */ readonly thyValue: _angular_core.InputSignal; /** * 选项的图标 */ readonly thyIcon: _angular_core.InputSignal; /** * 是否禁用该选项 */ readonly thyDisabled: _angular_core.InputSignalWithTransform; isOnlyIcon: _angular_core.WritableSignal; isWithText: _angular_core.WritableSignal; private destroyRef; constructor(); select(): void; unselect(): void; private wrapSpanForText; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface ThySegmentEvent { event?: Event; value: TValue; activeIndex: number; } type ThySegmentSize = 'xs' | 'sm' | 'md' | 'default'; type ThySegmentMode = 'block' | 'inline'; /** * 分段控制器组件 * @name thy-segment */ declare class ThySegment implements IThySegmentComponent { private cdr; /** * @internal */ readonly options: _angular_core.Signal; /** * 大小 * @type xs | sm | md | default */ readonly thySize: _angular_core.InputSignal; /** * 模式 * @type block | inline */ readonly thyMode: _angular_core.InputSignal; /** * 是否禁用分段控制器 */ readonly thyDisabled: _angular_core.InputSignalWithTransform; /** * 选中选项的索引 */ readonly thyActiveIndex: _angular_core.InputSignalWithTransform; /** * 选项被选中的回调事件 */ readonly thySelectChange: _angular_core.OutputEmitterRef>; selectedItem: ThySegmentItem | null; private newActiveIndex?; private activeIndex?; animationState: _angular_core.WritableSignal<{ value: string; params: ThumbAnimationProps; } | null>; transitionedTo: any; constructor(); changeSelectedItem(item: ThySegmentItem, event?: Event): void; handleThumbAnimationDone(event: AnimationEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class ThySegmentModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { ThySegment, ThySegmentItem, ThySegmentModule }; export type { ThySegmentEvent, ThySegmentMode, ThySegmentSize };