import { NgTemplateOutlet } from '@angular/common';
import * as i0 from '@angular/core';
import { input, booleanAttribute, inject, ElementRef, signal, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';

let statusIndicatorId = 0;
class Point {
    /** @hidden */
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
}
class StatusIndicatorComponent {
    constructor() {
        /**
         * value id defines the id of the object.
         */
        this.id = input('fd-status-indicator-' + ++statusIndicatorId, ...(ngDevMode ? [{ debugName: "id" }] : []));
        /**
         * defines the size of the status indicator.
         * Can be one of the following: 'sm' | 'md' | 'lg' | 'xl'
         * Default size is Medium(md).
         */
        this.size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
        /**
         * The status represented by the Status Indicator.
         * Can be one of the following: 'negative' | 'critical' | 'informative'
         * For default Object Status omit this property
         */
        this.status = input(...(ngDevMode ? [undefined, { debugName: "status" }] : []));
        /** Define the text content of the Status indicator*/
        this.statusLabel = input(...(ngDevMode ? [undefined, { debugName: "statusLabel" }] : []));
        /**
         * positioning of the status indicator image within the defined height and width .
         */
        this.viewBox = input(...(ngDevMode ? [undefined, { debugName: "viewBox" }] : []));
        /**
         * boolean value to be marked as clickable
         */
        this.clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable" }] : []));
        /**
         * defines the size of the status indicator.
         * Can be one of the following: 'sm' | 'md' | 'lg' | 'xl'
         */
        this.labelSize = input('sm', ...(ngDevMode ? [{ debugName: "labelSize" }] : []));
        /** Aria label for the Status Indicator. */
        this.ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : []));
        /** Aria defines role description for the Status Indicator. */
        this.ariaRoleDescription = input(...(ngDevMode ? [undefined, { debugName: "ariaRoleDescription" }] : []));
        /** Aria Focusable for the Status Indicator. */
        this.focusable = input(false, { ...(ngDevMode ? { debugName: "focusable" } : {}), transform: booleanAttribute });
        /** Aria Role for the Status Indicator. */
        this.role = input(...(ngDevMode ? [undefined, { debugName: "role" }] : []));
        /** Aria Value Text for the Status Indicator. */
        this.ariaValueText = input(...(ngDevMode ? [undefined, { debugName: "ariaValueText" }] : []));
        /** Aria title for the status indicator. */
        this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
        /** defines the label position the value can be 'left' | 'right' | 'top' | 'bottom' */
        this.labelPosition = input(...(ngDevMode ? [undefined, { debugName: "labelPosition" }] : []));
        /** Path for the status indicator */
        this.path = input(...(ngDevMode ? [undefined, { debugName: "path" }] : []));
        /**
         * Offset value to be filled under the give percentatge value.
         */
        this.fillPercentage = input(...(ngDevMode ? [undefined, { debugName: "fillPercentage" }] : []));
        /**
         * value to define fill direction
         */
        this.fillDirection = input('clockwise', ...(ngDevMode ? [{ debugName: "fillDirection" }] : []));
        /**
         * FillingType to represent the fill pattern of the component
         */
        this.fillingType = input('lineardown', ...(ngDevMode ? [{ debugName: "fillingType" }] : []));
        /** represent the degree of angle to project the filling of the component */
        this.angle = input(...(ngDevMode ? [undefined, { debugName: "angle" }] : []));
        /** @hidden */
        this.elementRef = inject((ElementRef));
        /** @hidden */
        this.binaryString = signal('', ...(ngDevMode ? [{ debugName: "binaryString" }] : []));
        /** @hidden */
        this.x1 = signal('', ...(ngDevMode ? [{ debugName: "x1" }] : []));
        /** @hidden */
        this.y1 = signal('', ...(ngDevMode ? [{ debugName: "y1" }] : []));
        /** @hidden */
        this.x2 = signal('', ...(ngDevMode ? [{ debugName: "x2" }] : []));
        /** @hidden */
        this.y2 = signal('', ...(ngDevMode ? [{ debugName: "y2" }] : []));
        /** @hidden */
        this.pointsArray = signal([], ...(ngDevMode ? [{ debugName: "pointsArray" }] : []));
        /** @hidden Computed fill calculator based on percentage and path length */
        this.fillCalculator = computed(() => {
            const percentage = this.fillPercentage();
            const pathLength = this.path()?.length || 0;
            if (percentage === undefined || percentage < 0) {
                return 0;
            }
            return (percentage * pathLength) / 100;
        }, ...(ngDevMode ? [{ debugName: "fillCalculator" }] : []));
        /** @hidden Computed CSS class */
        this._cssClass = computed(() => [
            'fd-status-indicator',
            this.size() ? `fd-status-indicator--${this.size()}` : '',
            this.status() ? `fd-status-indicator--${this.status()}` : '',
            this.clickable() ? 'fd-status-indicator--link' : '',
            this.labelPosition() === 'right' || this.labelPosition() === 'left'
                ? 'fd-status-indicator--horizontal-label'
                : ''
        ]
            .filter(Boolean)
            .join(' '), ...(ngDevMode ? [{ debugName: "_cssClass" }] : []));
        this.labelCssClass = computed(() => [
            'fd-status-indicator__label',
            this.labelSize() ? `fd-status-indicator__label--${this.labelSize()}` : '',
            this.labelPosition() ? `fd-status-indicator__label--${this.labelPosition()}` : ''
        ]
            .filter(Boolean)
            .join(' '), ...(ngDevMode ? [{ debugName: "labelCssClass" }] : []));
    }
    /** @hidden */
    ngAfterViewInit() {
        this._angleCalculation();
    }
    /** @hidden */
    _angleCalculation() {
        let sPointsAttributeValue;
        let polygonPoints;
        const fillType = this.fillingType();
        switch (fillType) {
            case 'angled': {
                const angleValue = this.angle();
                if (angleValue !== undefined) {
                    const binaryStr = this._convertAngleToBinary(angleValue);
                    this.binaryString.set(binaryStr);
                    this._assignBinaryValue(binaryStr);
                }
                break;
            }
            case 'radial': {
                const tempPercent = this.fillCalculator() % 1;
                const fillNumber = Number(tempPercent.toFixed(2));
                const element = this.elementRef.nativeElement.querySelectorAll('svg');
                const points = [];
                for (let i = 1; i < element.length; i++) {
                    sPointsAttributeValue = this._getPolygonPointsForCircularFilling(fillNumber * 100, element[i].getBBox());
                    polygonPoints = sPointsAttributeValue.reduce((acc, item) => acc + item.x + ',' + item.y + ' ', '');
                    points.push(polygonPoints);
                }
                this.pointsArray.set(points);
                break;
            }
            case 'linearup': {
                const binaryStr = this._convertAngleToBinary(90);
                this.binaryString.set(binaryStr);
                this._assignBinaryValue(binaryStr);
                break;
            }
            case 'lineardown': {
                const binaryStr = this._convertAngleToBinary(270);
                this.binaryString.set(binaryStr);
                this._assignBinaryValue(binaryStr);
                break;
            }
            case 'linearleft': {
                const binaryStr = this._convertAngleToBinary(180);
                this.binaryString.set(binaryStr);
                this._assignBinaryValue(binaryStr);
                break;
            }
            default:
                throw new Error(`fdStatusIndicator: No fillType found for ${fillType}.`);
        }
    }
    /** @hidden */
    _convertAngleToBinary(angle) {
        if (angle > 0 && angle <= 45) {
            return '1,0,0,1';
        }
        else if (angle >= 45 && angle < 90) {
            return '0,0,0,1';
        }
        else if (angle >= 90 && angle < 135) {
            return '0,0,0,1';
        }
        else if (angle >= 135 && angle < 180) {
            return '0,0,1,1';
        }
        else if (angle >= 180 && angle < 225) {
            return '0,0,1,0';
        }
        else if (angle >= 225 && angle < 270) {
            return '0,1,1,0';
        }
        else if (angle >= 270 && angle < 315) {
            return '0,1,0,0';
        }
        else if (angle >= 315 && angle < 360) {
            return '1,1,0,0';
        }
        else if (angle === 0 || angle === 360) {
            return '1,0,0,0';
        }
        else {
            return 'invalid';
        }
    }
    /** @hidden */
    _assignBinaryValue(binaryString) {
        const binaryValue = binaryString.split(',');
        this.x1.set(binaryValue[0]);
        this.y1.set(binaryValue[1]);
        this.x2.set(binaryValue[2]);
        this.y2.set(binaryValue[3]);
    }
    /** @hidden */
    _getPolygonPointsForCircularFilling(value, boundingBoxSvg) {
        const angle = 3.6 * value;
        const points = [];
        let xDifferenceFromBoundaryCentre;
        let yDifferenceFromBoundaryCentre;
        let polygonPoint;
        // starts at 12, the algorithm computes the coordination for clockwise direction only
        // counter clockwise direction is managed by symmetry
        const oStartPoint = new Point(boundingBoxSvg.x + boundingBoxSvg.width / 2, boundingBoxSvg.y);
        const oCentrePoint = new Point(boundingBoxSvg.x + boundingBoxSvg.width / 2, boundingBoxSvg.y + boundingBoxSvg.height / 2);
        // Reflects x coordinate by centre point for Counter Clockwise type
        const _adjustIfCounterClockwise = (oPoint) => {
            const res = Object.assign({}, oPoint);
            if (this.fillDirection() === 'counterclockwise') {
                const iXDistanceFromCentre = oPoint.x - oCentrePoint.x;
                res.x = oCentrePoint.x - iXDistanceFromCentre;
            }
            return res;
        };
        // Boundary centre is given by angle distance from the beginning (0°). The returned difference is related
        // to x or y coordinate depending on boundary centre angle (e.g. 0° -> x, 90° -> y, 180° -> x  270° -> y).
        // Boundary length is length of the corresponding side of bounding box (width for x, height for y).
        const computeDifferenceFromBoundaryCentre = (inAngle, iBoundaryCentreAngle, iBoundaryLength) => {
            const tan = Math.tan(((iBoundaryCentreAngle - inAngle) * Math.PI) / 180);
            return (tan * iBoundaryLength) / 2;
        };
        points.push(oStartPoint);
        if (0 < angle && angle < 45) {
            xDifferenceFromBoundaryCentre = computeDifferenceFromBoundaryCentre(angle, 0, boundingBoxSvg.height);
            polygonPoint = new Point(oStartPoint.x - xDifferenceFromBoundaryCentre, oStartPoint.y);
            points.push(_adjustIfCounterClockwise(polygonPoint));
        }
        if (45 <= angle) {
            points.push(_adjustIfCounterClockwise(new Point(boundingBoxSvg.x + boundingBoxSvg.width, boundingBoxSvg.y)));
        }
        if (45 < angle && angle < 135) {
            yDifferenceFromBoundaryCentre = computeDifferenceFromBoundaryCentre(angle, 90, boundingBoxSvg.width);
            polygonPoint = new Point(boundingBoxSvg.x + boundingBoxSvg.width, boundingBoxSvg.y + boundingBoxSvg.height / 2 - yDifferenceFromBoundaryCentre);
            points.push(_adjustIfCounterClockwise(polygonPoint));
        }
        if (135 <= angle) {
            points.push(_adjustIfCounterClockwise(new Point(boundingBoxSvg.x + boundingBoxSvg.width, boundingBoxSvg.y + boundingBoxSvg.height)));
        }
        if (135 < angle && angle < 225) {
            xDifferenceFromBoundaryCentre = computeDifferenceFromBoundaryCentre(angle, 180, boundingBoxSvg.height);
            polygonPoint = new Point(boundingBoxSvg.x + boundingBoxSvg.width / 2 + xDifferenceFromBoundaryCentre, boundingBoxSvg.y + boundingBoxSvg.height);
            points.push(_adjustIfCounterClockwise(polygonPoint));
        }
        if (225 <= angle) {
            points.push(_adjustIfCounterClockwise(new Point(boundingBoxSvg.x, boundingBoxSvg.y + boundingBoxSvg.height)));
        }
        if (225 < angle && angle < 315) {
            yDifferenceFromBoundaryCentre = computeDifferenceFromBoundaryCentre(angle, 270, boundingBoxSvg.width);
            polygonPoint = new Point(boundingBoxSvg.x, boundingBoxSvg.y + boundingBoxSvg.height / 2 + yDifferenceFromBoundaryCentre);
            points.push(_adjustIfCounterClockwise(polygonPoint));
        }
        if (315 <= angle) {
            points.push(_adjustIfCounterClockwise(new Point(boundingBoxSvg.x, boundingBoxSvg.y)));
        }
        if (315 < angle && angle <= 360) {
            xDifferenceFromBoundaryCentre = computeDifferenceFromBoundaryCentre(angle, 360, boundingBoxSvg.height);
            polygonPoint = new Point(boundingBoxSvg.x + boundingBoxSvg.width / 2 - xDifferenceFromBoundaryCentre, boundingBoxSvg.y);
            points.push(_adjustIfCounterClockwise(polygonPoint));
        }
        points.push(oCentrePoint);
        return points;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: StatusIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: StatusIndicatorComponent, isStandalone: true, selector: "fd-status-indicator", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, statusLabel: { classPropertyName: "statusLabel", publicName: "statusLabel", isSignal: true, isRequired: false, transformFunction: null }, viewBox: { classPropertyName: "viewBox", publicName: "viewBox", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, labelSize: { classPropertyName: "labelSize", publicName: "labelSize", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaRoleDescription: { classPropertyName: "ariaRoleDescription", publicName: "ariaRoleDescription", isSignal: true, isRequired: false, transformFunction: null }, focusable: { classPropertyName: "focusable", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaValueText: { classPropertyName: "ariaValueText", publicName: "ariaValueText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, fillPercentage: { classPropertyName: "fillPercentage", publicName: "fillPercentage", isSignal: true, isRequired: false, transformFunction: null }, fillDirection: { classPropertyName: "fillDirection", publicName: "fillDirection", isSignal: true, isRequired: false, transformFunction: null }, fillingType: { classPropertyName: "fillingType", publicName: "fillingType", isSignal: true, isRequired: false, transformFunction: null }, angle: { classPropertyName: "angle", publicName: "angle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_cssClass()", "attr.aria-label": "ariaLabel()", "attr.aria-roledescription": "ariaRoleDescription()", "attr.focusable": "focusable()", "attr.title": "title()", "attr.role": "role()", "attr.aria-valuetext": "ariaValueText()", "attr.aria-valuenow": "fillPercentage() || 0", "attr.aria-valuemin": "0", "attr.aria-valuemax": "100", "attr.tabindex": "focusable() ? 0 : -1" } }, ngImport: i0, template: "@if (labelPosition() === 'left' || labelPosition() === 'top') {\n    <span [class]=\"labelCssClass()\">{{ statusLabel() }} </span>\n}\n<svg\n    [attr.id]=\"id()\"\n    data-sap-ui=\"__shape0-__box21-24\"\n    version=\"1.1\"\n    [attr.viewBox]=\"viewBox()\"\n    xlmns=\"http://www.w3.org/2000/svg\"\n    preserveAspectRatio=\"xMidYMid meet\"\n    class=\"fd-status-indicator__svg\"\n>\n    <ng-container [ngTemplateOutlet]=\"svgTemplate\"></ng-container>\n</svg>\n@if (labelPosition() === 'right' || labelPosition() === 'bottom') {\n    <span [class]=\"labelCssClass()\">{{ statusLabel() }} </span>\n}\n<ng-template #svgTemplate>\n    @for (path of path(); track path; let i = $index) {\n        <svg\n            xlmns=\"http://www.w3.org/2000/svg\"\n            preserveAspectRatio=\"xMidYMid meet\"\n            overflow=\"visible\"\n            [attr.id]=\"id() + i\"\n            data-sap-ui=\"id\"\n        >\n            <defs>\n                @if (!(fillCalculator() - i > 0 && fillCalculator() - i < 1) || fillingType() !== 'radial') {\n                    <linearGradient\n                        id=\"{{ id() + i }}-gradient\"\n                        [attr.x1]=\"x1()\"\n                        [attr.y1]=\"y1()\"\n                        [attr.x2]=\"x2()\"\n                        [attr.y2]=\"y2()\"\n                    >\n                        <stop [attr.offset]=\"fillCalculator() - i\" stop-color=\"white\">\n                            <animate\n                                attributeName=\"offset\"\n                                attr.values=\"0, {{ fillCalculator() - i }}\"\n                                repeatCount=\"1\"\n                                dur=\"1s\"\n                                begin=\"0s\"\n                            />\n                        </stop>\n                        <stop [attr.offset]=\"fillCalculator() - i\" stop-color=\"transparent\">\n                            <animate\n                                attributeName=\"offset\"\n                                attr.values=\"0, {{ fillCalculator() - i }}\"\n                                repeatCount=\"1\"\n                                dur=\"1s\"\n                                begin=\"0s\"\n                            />\n                        </stop>\n                    </linearGradient>\n                }\n                <mask #maskTemplate id=\"{{ id() + i }}-mask\">\n                    @if (!(fillCalculator() - i > 0 && fillCalculator() - i < 1) || fillingType() !== 'radial') {\n                        <path\n                            id=\"{{ id() + i }}-mask-shape\"\n                            [attr.d]=\"path\"\n                            stroke-width=\"0\"\n                            stroke=\"white\"\n                            attr.fill=\"url(#{{ id() + i }}-gradient)\"\n                        ></path>\n                    }\n                    @if (fillingType() === 'radial' && fillCalculator() - i > 0 && fillCalculator() - i < 1) {\n                        <polygon id=\"{{ id() + i }}-mask-shape\" fill=\"white\" [attr.points]=\"pointsArray()[i]\"></polygon>\n                    }\n                </mask>\n            </defs>\n            <path\n                id=\"{{ id() + i }}-shape\"\n                [attr.d]=\"path\"\n                stroke-width=\"0\"\n                stroke=\"#89919A\"\n                attr.mask=\"url(#{{ id() + i }}-mask)\"\n            ></path>\n            <path\n                id=\"{{ id() + i }}-shape-border\"\n                [attr.d]=\"path\"\n                stroke-width=\"0.25\"\n                stroke=\"#89919A\"\n                fill=\"transparent\"\n            ></path>\n        </svg>\n    }\n</ng-template>\n", styles: [".fd-status-indicator{color:var(--sapContent_LabelColor);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;stroke:var(--sapNeutralElementColor);stroke-width:.25;fill:transparent;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-status-indicator.is-focus,.fd-status-indicator:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:var(--sapContent_FocusWidth);z-index:5}.fd-status-indicator:after,.fd-status-indicator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-status-indicator--horizontal-label{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fd-status-indicator--horizontal-label:after,.fd-status-indicator--horizontal-label:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-status-indicator--link{cursor:pointer}.fd-status-indicator__label,.fd-status-indicator__label--sm{font-size:var(--sapFontSmallSize,.75rem)}.fd-status-indicator__label--sm.fd-status-indicator__label--top{-webkit-margin-after:.375rem;margin-block-end:.375rem}.fd-status-indicator__label--sm.fd-status-indicator__label--right{-webkit-margin-start:.375rem;margin-inline-start:.375rem}.fd-status-indicator__label--sm.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--sm.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--sm.fd-status-indicator__label--left{-webkit-margin-end:.375rem;margin-inline-end:.375rem}.fd-status-indicator__label--sm.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--sm.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--sm.fd-status-indicator__label--bottom{margin-top:.375rem}.fd-status-indicator__label--md{font-size:var(--sapFontSize,.875rem)}.fd-status-indicator__label--md.fd-status-indicator__label--top{-webkit-margin-after:.5rem;margin-block-end:.5rem}.fd-status-indicator__label--md.fd-status-indicator__label--right{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-status-indicator__label--md.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--md.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--md.fd-status-indicator__label--left{-webkit-margin-end:.5rem;margin-inline-end:.5rem}.fd-status-indicator__label--md.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--md.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--md.fd-status-indicator__label--bottom{margin-top:.5rem}.fd-status-indicator__label--lg{font-size:1.125rem}.fd-status-indicator__label--lg.fd-status-indicator__label--top{-webkit-margin-after:.75rem;margin-block-end:.75rem}.fd-status-indicator__label--lg.fd-status-indicator__label--right{-webkit-margin-start:.75rem;margin-inline-start:.75rem}.fd-status-indicator__label--lg.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--lg.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--lg.fd-status-indicator__label--left{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.fd-status-indicator__label--lg.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--lg.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--lg.fd-status-indicator__label--bottom{margin-top:.75rem}.fd-status-indicator__label--xl{font-size:1.875rem}.fd-status-indicator__label--xl.fd-status-indicator__label--top{-webkit-margin-after:1rem;margin-block-end:1rem}.fd-status-indicator__label--xl.fd-status-indicator__label--right{-webkit-margin-start:1rem;margin-inline-start:1rem}.fd-status-indicator__label--xl.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--xl.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--xl.fd-status-indicator__label--left{-webkit-margin-end:1rem;margin-inline-end:1rem}.fd-status-indicator__label--xl.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--xl.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--xl.fd-status-indicator__label--bottom{margin-top:1rem}.fd-status-indicator--positive{fill:var(--sapPositiveElementColor);color:var(--sapPositiveElementColor)}.fd-status-indicator--critical{fill:var(--sapCriticalElementColor);color:var(--sapCriticalElementColor)}.fd-status-indicator--negative{fill:var(--sapNegativeElementColor);color:var(--sapNegativeElementColor)}.fd-status-indicator--sm .fd-status-indicator__svg{height:1.375rem;width:1.875rem}.fd-status-indicator--md .fd-status-indicator__svg{height:1.875rem;width:2.8125rem}.fd-status-indicator--lg .fd-status-indicator__svg{height:3.4375rem;width:5rem}.fd-status-indicator--xl .fd-status-indicator__svg{height:6.25rem;width:9.0625rem}\n/*! Bundled license information:\n\nfundamental-styles/dist/status-indicator.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: StatusIndicatorComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-status-indicator', host: {
                        '[class]': '_cssClass()',
                        '[attr.aria-label]': 'ariaLabel()',
                        '[attr.aria-roledescription]': 'ariaRoleDescription()',
                        '[attr.focusable]': 'focusable()',
                        '[attr.title]': 'title()',
                        '[attr.role]': 'role()',
                        '[attr.aria-valuetext]': 'ariaValueText()',
                        '[attr.aria-valuenow]': 'fillPercentage() || 0',
                        '[attr.aria-valuemin]': '0',
                        '[attr.aria-valuemax]': '100',
                        '[attr.tabindex]': 'focusable() ? 0 : -1'
                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet], template: "@if (labelPosition() === 'left' || labelPosition() === 'top') {\n    <span [class]=\"labelCssClass()\">{{ statusLabel() }} </span>\n}\n<svg\n    [attr.id]=\"id()\"\n    data-sap-ui=\"__shape0-__box21-24\"\n    version=\"1.1\"\n    [attr.viewBox]=\"viewBox()\"\n    xlmns=\"http://www.w3.org/2000/svg\"\n    preserveAspectRatio=\"xMidYMid meet\"\n    class=\"fd-status-indicator__svg\"\n>\n    <ng-container [ngTemplateOutlet]=\"svgTemplate\"></ng-container>\n</svg>\n@if (labelPosition() === 'right' || labelPosition() === 'bottom') {\n    <span [class]=\"labelCssClass()\">{{ statusLabel() }} </span>\n}\n<ng-template #svgTemplate>\n    @for (path of path(); track path; let i = $index) {\n        <svg\n            xlmns=\"http://www.w3.org/2000/svg\"\n            preserveAspectRatio=\"xMidYMid meet\"\n            overflow=\"visible\"\n            [attr.id]=\"id() + i\"\n            data-sap-ui=\"id\"\n        >\n            <defs>\n                @if (!(fillCalculator() - i > 0 && fillCalculator() - i < 1) || fillingType() !== 'radial') {\n                    <linearGradient\n                        id=\"{{ id() + i }}-gradient\"\n                        [attr.x1]=\"x1()\"\n                        [attr.y1]=\"y1()\"\n                        [attr.x2]=\"x2()\"\n                        [attr.y2]=\"y2()\"\n                    >\n                        <stop [attr.offset]=\"fillCalculator() - i\" stop-color=\"white\">\n                            <animate\n                                attributeName=\"offset\"\n                                attr.values=\"0, {{ fillCalculator() - i }}\"\n                                repeatCount=\"1\"\n                                dur=\"1s\"\n                                begin=\"0s\"\n                            />\n                        </stop>\n                        <stop [attr.offset]=\"fillCalculator() - i\" stop-color=\"transparent\">\n                            <animate\n                                attributeName=\"offset\"\n                                attr.values=\"0, {{ fillCalculator() - i }}\"\n                                repeatCount=\"1\"\n                                dur=\"1s\"\n                                begin=\"0s\"\n                            />\n                        </stop>\n                    </linearGradient>\n                }\n                <mask #maskTemplate id=\"{{ id() + i }}-mask\">\n                    @if (!(fillCalculator() - i > 0 && fillCalculator() - i < 1) || fillingType() !== 'radial') {\n                        <path\n                            id=\"{{ id() + i }}-mask-shape\"\n                            [attr.d]=\"path\"\n                            stroke-width=\"0\"\n                            stroke=\"white\"\n                            attr.fill=\"url(#{{ id() + i }}-gradient)\"\n                        ></path>\n                    }\n                    @if (fillingType() === 'radial' && fillCalculator() - i > 0 && fillCalculator() - i < 1) {\n                        <polygon id=\"{{ id() + i }}-mask-shape\" fill=\"white\" [attr.points]=\"pointsArray()[i]\"></polygon>\n                    }\n                </mask>\n            </defs>\n            <path\n                id=\"{{ id() + i }}-shape\"\n                [attr.d]=\"path\"\n                stroke-width=\"0\"\n                stroke=\"#89919A\"\n                attr.mask=\"url(#{{ id() + i }}-mask)\"\n            ></path>\n            <path\n                id=\"{{ id() + i }}-shape-border\"\n                [attr.d]=\"path\"\n                stroke-width=\"0.25\"\n                stroke=\"#89919A\"\n                fill=\"transparent\"\n            ></path>\n        </svg>\n    }\n</ng-template>\n", styles: [".fd-status-indicator{color:var(--sapContent_LabelColor);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;stroke:var(--sapNeutralElementColor);stroke-width:.25;fill:transparent;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-status-indicator.is-focus,.fd-status-indicator:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:var(--sapContent_FocusWidth);z-index:5}.fd-status-indicator:after,.fd-status-indicator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-status-indicator--horizontal-label{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fd-status-indicator--horizontal-label:after,.fd-status-indicator--horizontal-label:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-status-indicator--link{cursor:pointer}.fd-status-indicator__label,.fd-status-indicator__label--sm{font-size:var(--sapFontSmallSize,.75rem)}.fd-status-indicator__label--sm.fd-status-indicator__label--top{-webkit-margin-after:.375rem;margin-block-end:.375rem}.fd-status-indicator__label--sm.fd-status-indicator__label--right{-webkit-margin-start:.375rem;margin-inline-start:.375rem}.fd-status-indicator__label--sm.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--sm.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--sm.fd-status-indicator__label--left{-webkit-margin-end:.375rem;margin-inline-end:.375rem}.fd-status-indicator__label--sm.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--sm.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--sm.fd-status-indicator__label--bottom{margin-top:.375rem}.fd-status-indicator__label--md{font-size:var(--sapFontSize,.875rem)}.fd-status-indicator__label--md.fd-status-indicator__label--top{-webkit-margin-after:.5rem;margin-block-end:.5rem}.fd-status-indicator__label--md.fd-status-indicator__label--right{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-status-indicator__label--md.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--md.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--md.fd-status-indicator__label--left{-webkit-margin-end:.5rem;margin-inline-end:.5rem}.fd-status-indicator__label--md.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--md.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--md.fd-status-indicator__label--bottom{margin-top:.5rem}.fd-status-indicator__label--lg{font-size:1.125rem}.fd-status-indicator__label--lg.fd-status-indicator__label--top{-webkit-margin-after:.75rem;margin-block-end:.75rem}.fd-status-indicator__label--lg.fd-status-indicator__label--right{-webkit-margin-start:.75rem;margin-inline-start:.75rem}.fd-status-indicator__label--lg.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--lg.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--lg.fd-status-indicator__label--left{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.fd-status-indicator__label--lg.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--lg.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--lg.fd-status-indicator__label--bottom{margin-top:.75rem}.fd-status-indicator__label--xl{font-size:1.875rem}.fd-status-indicator__label--xl.fd-status-indicator__label--top{-webkit-margin-after:1rem;margin-block-end:1rem}.fd-status-indicator__label--xl.fd-status-indicator__label--right{-webkit-margin-start:1rem;margin-inline-start:1rem}.fd-status-indicator__label--xl.fd-status-indicator__label--right[dir=rtl],[dir=rtl] .fd-status-indicator__label--xl.fd-status-indicator__label--right{-webkit-transform:matrix(1,0,0,1,22,1);transform:matrix(1,0,0,1,22,1)}.fd-status-indicator__label--xl.fd-status-indicator__label--left{-webkit-margin-end:1rem;margin-inline-end:1rem}.fd-status-indicator__label--xl.fd-status-indicator__label--left[dir=rtl],[dir=rtl] .fd-status-indicator__label--xl.fd-status-indicator__label--left{-webkit-transform:matrix(1,0,0,1,-22,1);transform:matrix(1,0,0,1,-22,1)}.fd-status-indicator__label--xl.fd-status-indicator__label--bottom{margin-top:1rem}.fd-status-indicator--positive{fill:var(--sapPositiveElementColor);color:var(--sapPositiveElementColor)}.fd-status-indicator--critical{fill:var(--sapCriticalElementColor);color:var(--sapCriticalElementColor)}.fd-status-indicator--negative{fill:var(--sapNegativeElementColor);color:var(--sapNegativeElementColor)}.fd-status-indicator--sm .fd-status-indicator__svg{height:1.375rem;width:1.875rem}.fd-status-indicator--md .fd-status-indicator__svg{height:1.875rem;width:2.8125rem}.fd-status-indicator--lg .fd-status-indicator__svg{height:3.4375rem;width:5rem}.fd-status-indicator--xl .fd-status-indicator__svg{height:6.25rem;width:9.0625rem}\n/*! Bundled license information:\n\nfundamental-styles/dist/status-indicator.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"] }]
        }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], statusLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusLabel", required: false }] }], viewBox: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewBox", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], labelSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSize", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaRoleDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaRoleDescription", required: false }] }], focusable: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusable", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaValueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaValueText", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "path", required: false }] }], fillPercentage: [{ type: i0.Input, args: [{ isSignal: true, alias: "fillPercentage", required: false }] }], fillDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "fillDirection", required: false }] }], fillingType: [{ type: i0.Input, args: [{ isSignal: true, alias: "fillingType", required: false }] }], angle: [{ type: i0.Input, args: [{ isSignal: true, alias: "angle", required: false }] }] } });

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class StatusIndicatorModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: StatusIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: StatusIndicatorModule, imports: [StatusIndicatorComponent], exports: [StatusIndicatorComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: StatusIndicatorModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: StatusIndicatorModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [StatusIndicatorComponent],
                    exports: [StatusIndicatorComponent]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { Point, StatusIndicatorComponent, StatusIndicatorModule };
//# sourceMappingURL=fundamental-ngx-core-status-indicator.mjs.map
