import * as _angular_core from '@angular/core';
import { ElementRef, PipeTransform } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { HasElementRef } from '@fundamental-ngx/cdk/utils';
import { FormItemControl } from '@fundamental-ngx/core/form';
import { FdLanguage } from '@fundamental-ngx/i18n';

declare const INDICATOR_PREFIX = "fd-rating-indicator";
declare const INDICATOR_CLASSES: {
    halves: string;
    icon: string;
    hideDynamicText: string;
};
declare const INDICATOR_DEFAULT_CAPACITY = 5;
type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';
declare enum RatingIndicatorSizeEnum {
    'xs' = 0,
    'sm' = 1,
    'md' = 2,
    'lg' = 3,
    'cozy' = 4,
    'compact' = 5,
    'condensed' = 6
}

interface NumberKey<T> {
    [key: number]: T;
}
interface RatingViewItem {
    rate: number;
    votes: number;
}
declare class RatingIndicatorComponent implements ControlValueAccessor, FormItemControl, HasElementRef {
    /** Sets [name] attribute of input. */
    readonly name: _angular_core.InputSignal<string | undefined>;
    /**
     * Sets the aria-label attribute to the element.
     */
    readonly ariaLabel: _angular_core.InputSignal<string | null | undefined>;
    /**
     * Sets the aria-labelledby attribute to the element.
     */
    readonly ariaLabelledBy: _angular_core.InputSignal<string | null | undefined>;
    /**
     * Sets the aria-roledescription attribute to the element.
     */
    readonly ariaRoledescription: _angular_core.InputSignal<string | null | undefined>;
    /**
     * Input for disabled state from parent component.
     * Sets the aria-disabled attribute to the element.
     * Sets the is-disabled class to the element.
     */
    readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Whether the rating indicator is in displayMode
     */
    readonly displayMode: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Whether the rating indicator is in non-interactive state.
     */
    readonly nonInteractive: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Number of rates to display
     */
    readonly indicatorCapacity: _angular_core.InputSignalWithTransform<number, number>;
    /**
     * Whether or not to display half values.
     */
    readonly allowHalves: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * User's value number of ratings. If provided, Overrides ratingAverage.
     */
    readonly value: _angular_core.InputSignal<number>;
    /**
     * Total number of ratings. If provided, will display text showing the total number of ratings.
     */
    readonly totalRatings: _angular_core.InputSignal<number | null | undefined>;
    /**
     * Rating average
     */
    readonly ratingAverage: _angular_core.InputSignal<number | null | undefined>;
    /**
     * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.
     * Overrides totalRatings and ratingAverage.
     */
    readonly ratings: _angular_core.InputSignal<NumberKey<number> | null | undefined>;
    /**
     * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.
     */
    readonly displayAllRatings: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes
     */
    readonly ratedIcon: _angular_core.InputSignal<string | undefined>;
    /**
     * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes
     */
    readonly unratedIcon: _angular_core.InputSignal<string | undefined>;
    /**
     * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'
     */
    readonly size: _angular_core.InputSignal<RatingIndicatorSize>;
    /**
     * Text divider label between view value and indicator count.
     */
    readonly dynamicTextIndicator: _angular_core.InputSignal<string>;
    /**
     * Whether to display the dynamic text (rating value and count) after the rating indicator.
     * When false, only the star rating UI is shown without any text.
     */
    readonly showDynamicText: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Fired when the user sets or changes their rating.
     */
    readonly ratingChanged: _angular_core.OutputEmitterRef<number>;
    /** @hidden */
    readonly elementRef: ElementRef<any>;
    /** Computed display value - returns the current internal value */
    readonly displayValue: _angular_core.Signal<number>;
    /** @hidden Current language signal for i18n */
    protected readonly language: _angular_core.Signal<FdLanguage>;
    /** @hidden Internal mutable value for CVA and computed display value */
    protected readonly internalValue: _angular_core.WritableSignal<number>;
    /**
     * Internal mutable disabled state.
     * Allows ControlValueAccessor to modify disabled state independently of input.
     */
    protected readonly internalDisabled: _angular_core.WritableSignal<boolean>;
    /** @hidden Internal total ratings for computed state */
    protected readonly internalTotalRatings: _angular_core.WritableSignal<number | null | undefined>;
    /** @hidden Internal rating average for computed state */
    protected readonly internalRatingAverage: _angular_core.WritableSignal<number | null | undefined>;
    /** @hidden Rating items for popover content */
    protected readonly ratingItems: _angular_core.WritableSignal<RatingViewItem[]>;
    /** @hidden Unique ID for this rating indicator instance */
    protected readonly ratingUID: number;
    /** @hidden Computed size class based on size input */
    protected readonly sizeClass: _angular_core.Signal<string>;
    /** @hidden Computed rates array based on capacity and halves setting */
    protected readonly rates: _angular_core.Signal<{
        id: string;
        value: number;
    }[]>;
    /** @hidden Computed signal to determine if dynamic text should be hidden */
    protected readonly hideDynamicText: _angular_core.Signal<boolean>;
    /** @hidden Computed CSS classes for host binding */
    protected readonly cssClass: _angular_core.Signal<string>;
    /** @hidden */
    constructor();
    /** @hidden CVA onChange callback */
    onChange: (value: number) => void;
    /** @hidden CVA onTouched callback */
    onTouched: () => void;
    /**
     * @deprecated Use `displayValue()` signal directly instead
     * @hidden Backward compatibility getter
     */
    get viewValue(): number;
    /**
     * @deprecated Use `ratingUID` property directly instead
     * @hidden Backward compatibility getter
     */
    get viewRatingUID(): number;
    /**
     * @deprecated Use `indicatorCapacity()` signal directly instead
     * @hidden Backward compatibility getter
     */
    get indicatorCount(): number;
    /** Public getter for computed rating average value. */
    get computedRatingAverage(): number | undefined | null;
    /** Public getter for computed total ratings value. */
    get computedTotalRatings(): number | undefined | null;
    /** @hidden CVA writeValue - updates internal value signal */
    writeValue(value: number): void;
    /** @hidden */
    registerOnChange(fn: (value: number) => void): void;
    /** @hidden */
    registerOnTouched(fn: () => void): void;
    /** @hidden */
    setDisabledState(isDisabled: boolean): void;
    /** @hidden User selection handler */
    protected onSelect(value: number): void;
    /**
     * @hidden
     * Generate rating items for popover content from ratings object
     */
    private _generateRatings;
    /**
     * @hidden
     * get converted value from original to view value with depends on halves
     * For example,
     *  original value is equal to 2.34, you will get and render 2
     *  original value is equal to 3.74, you will get and render 4
     */
    private _parseValue;
    /**
     * @hidden
     * get rating icons array with value and unique id
     */
    private _getRates;
    /**
     * @hidden
     * Get size class for the rating indicator
     */
    private _getSizeClass;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<RatingIndicatorComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<RatingIndicatorComponent, "fd-rating-indicator", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaRoledescription": { "alias": "ariaRoledescription"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "displayMode": { "alias": "displayMode"; "required": false; "isSignal": true; }; "nonInteractive": { "alias": "nonInteractive"; "required": false; "isSignal": true; }; "indicatorCapacity": { "alias": "indicatorCapacity"; "required": false; "isSignal": true; }; "allowHalves": { "alias": "allowHalves"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "totalRatings": { "alias": "totalRatings"; "required": false; "isSignal": true; }; "ratingAverage": { "alias": "ratingAverage"; "required": false; "isSignal": true; }; "ratings": { "alias": "ratings"; "required": false; "isSignal": true; }; "displayAllRatings": { "alias": "displayAllRatings"; "required": false; "isSignal": true; }; "ratedIcon": { "alias": "ratedIcon"; "required": false; "isSignal": true; }; "unratedIcon": { "alias": "unratedIcon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dynamicTextIndicator": { "alias": "dynamicTextIndicator"; "required": false; "isSignal": true; }; "showDynamicText": { "alias": "showDynamicText"; "required": false; "isSignal": true; }; }, { "ratingChanged": "ratingChanged"; }, never, never, true, never>;
}

declare class RatingStarLabelPipe implements PipeTransform {
    /** @hidden */
    private readonly _translationResolver;
    /** Transforms the value to a rating value string. */
    transform(index: number, controlsCount: number, useHalves: boolean, currentLanguage: FdLanguage): string;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<RatingStarLabelPipe, never>;
    static ɵpipe: _angular_core.ɵɵPipeDeclaration<RatingStarLabelPipe, "ratingStarLabel", true>;
}

/**
 * @deprecated
 * Use direct import of `RatingIndicatorComponent`
 */
declare class RatingIndicatorModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<RatingIndicatorModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RatingIndicatorModule, never, [typeof RatingIndicatorComponent, typeof RatingStarLabelPipe], [typeof RatingIndicatorComponent, typeof RatingStarLabelPipe]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<RatingIndicatorModule>;
}

export { INDICATOR_CLASSES, INDICATOR_DEFAULT_CAPACITY, INDICATOR_PREFIX, RatingIndicatorComponent, RatingIndicatorModule, RatingIndicatorSizeEnum, RatingStarLabelPipe };
export type { RatingIndicatorSize };
