import * as i0 from '@angular/core';
import { ViewEncapsulation, ChangeDetectionStrategy, Component, input, Input, HostBinding, NgModule } from '@angular/core';
import { NgTemplateOutlet } from '@angular/common';
import { FormLabelComponent } from '@fundamental-ngx/core/form';
import { TitleComponent } from '@fundamental-ngx/core/title';

const FACET_CLASS_NAME = {
    facetContainer: 'fd-facet__container',
    facetRatingIndicatorContainer: 'fd-facet__rating-container',
    facetRatingIndicatorDynamicText: 'fd-facet__rating-dynamic-text',
    facetObjectStatus: 'fd-facet__object-status',
    facetObjectStatusText: 'fd-facet__object-status-text',
    marginTopTiny: 'fd-margin-top--tiny',
    marginBottomTiny: 'fd-margin-bottom--tiny',
    marginEndTiny: 'fd-margin-end--tiny',
    paddingNone: 'fd-padding--none'
};

const addClassNameToFacetElement = (renderer, element, className) => {
    renderer.addClass(element, className);
};

class FacetContentComponent {
    /** @hidden */
    constructor(elementRef, _renderer) {
        this.elementRef = elementRef;
        this._renderer = _renderer;
    }
    /** @hidden */
    ngOnInit() {
        this._addClassNameToHostElement(FACET_CLASS_NAME.facetContainer);
    }
    /** @hidden */
    _addClassNameToHostElement(className) {
        addClassNameToFacetElement(this._renderer, this.elementRef.nativeElement, className);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetContentComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: FacetContentComponent, isStandalone: true, selector: "fd-facet-content", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetContentComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'fd-facet-content',
                    template: `<ng-content></ng-content>`,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    standalone: true
                }]
        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });

class FacetContainerComponent {
    constructor() {
        /**
         * Value for the direction of the flex container.
         * Possible values: 'row' | 'row-reverse' | 'column' | 'column-reverse'
         * Default: 'column'
         */
        this.flexDirection = input('column', ...(ngDevMode ? [{ debugName: "flexDirection" }] : []));
        /**
         * Value for align-items of the flex container.
         * Possible values:
         * 'start', 'center', 'end', 'flex-start', 'flex-end', 'space-between', 'space-around',
         * 'space-evenly', 'stretch', 'self-start', 'self-end', 'baseline'
         * Default: 'start'
         */
        this.alignItems = input('start', ...(ngDevMode ? [{ debugName: "alignItems" }] : []));
        /**
         * Value for justify-content of the flex container.
         * Possible values:
         * 'start', 'center', 'end', 'flex-start', 'flex-end', 'space-between', 'space-around',
         * 'space-evenly', 'stretch'
         * Default: 'start'
         */
        this.justifyContent = input('start', ...(ngDevMode ? [{ debugName: "justifyContent" }] : []));
        /**
         * Value for the flex container gap in rem.
         * An integer number
         * Default: 1
         */
        this.flexGap = input(1, ...(ngDevMode ? [{ debugName: "flexGap" }] : []));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: FacetContainerComponent, isStandalone: true, selector: "fd-facet-container", inputs: { flexDirection: { classPropertyName: "flexDirection", publicName: "flexDirection", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null }, justifyContent: { classPropertyName: "justifyContent", publicName: "justifyContent", isSignal: true, isRequired: false, transformFunction: null }, flexGap: { classPropertyName: "flexGap", publicName: "flexGap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.fd-facet-container": "true", "style.gap.rem": "flexGap()", "style.flex-direction": "flexDirection()", "style.align-items": "alignItems()", "style.justify-content": "justifyContent()" } }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [".fd-facet-container{gap:1rem;display:flex;flex-direction:column;align-items:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetContainerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-facet-container', template: ` <ng-content></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
                        '[class.fd-facet-container]': 'true',
                        '[style.gap.rem]': 'flexGap()',
                        '[style.flex-direction]': 'flexDirection()',
                        '[style.align-items]': 'alignItems()',
                        '[style.justify-content]': 'justifyContent()'
                    }, standalone: true, styles: [".fd-facet-container{gap:1rem;display:flex;flex-direction:column;align-items:center}\n"] }]
        }], propDecorators: { flexDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexDirection", required: false }] }], alignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignItems", required: false }] }], justifyContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "justifyContent", required: false }] }], flexGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexGap", required: false }] }] } });

class FacetGroupComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: FacetGroupComponent, isStandalone: true, selector: "fd-facet-group", inputs: { ariaLabel: "ariaLabel" }, host: { attributes: { "role": "group" }, properties: { "class.fd-facet-group": "true", "attr.aria-label": "ariaLabel" } }, ngImport: i0, template: ` <ng-content select="fd-facet"></ng-content> `, isInline: true, styles: [".fd-facet-align-end{order:1;display:flex;flex:1;flex-direction:column;align-items:flex-end}.fd-title.fd-margin-bottom--sm{margin-block-end:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetGroupComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-facet-group', template: ` <ng-content select="fd-facet"></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
                        '[class.fd-facet-group]': 'true',
                        '[attr.aria-label]': 'ariaLabel',
                        role: 'group'
                    }, standalone: true, styles: [".fd-facet-align-end{order:1;display:flex;flex:1;flex-direction:column;align-items:flex-end}.fd-title.fd-margin-bottom--sm{margin-block-end:1rem}\n"] }]
        }], propDecorators: { ariaLabel: [{
                type: Input
            }] } });

let randomId = 0;
let randomTitleId = 0;
class FacetComponent {
    /**
     * Heading level of the facet title.
     */
    set headingLevel(level) {
        if (typeof level === 'number') {
            this._headingLevel = level;
        }
        else if (typeof level === 'string') {
            this._headingLevel = Number.parseInt(level.replace(/\D/g, ''), 10);
        }
    }
    /** @hidden
     * the appropriate role for each facet type
     */
    get role() {
        return this.type !== 'image' ? 'group' : '';
    }
    /** @hidden
     * the appropriate aria-labelledby to associate with the role
     */
    get ariaLabelledby() {
        return this.type !== 'image' ? this.titleId : '';
    }
    /** @hidden */
    constructor(elementRef, _renderer) {
        this.elementRef = elementRef;
        this._renderer = _renderer;
        /**
         * id for the facet
         */
        this.id = `fd-facet-id-${randomId++}`;
        /**
         * property that allows the facet to be aligned to the end of the facet group, right-aligned.
         */
        this.alignEnd = false;
        /** @hidden
         * the internal id for the title to be associated with the aria-labelledby
         */
        this.titleId = `fd-facet-title-id-${randomTitleId++}`;
    }
    /** @hidden */
    ngAfterViewInit() {
        this._setupAdditionalStyles();
        this._addAlignmentModifier();
    }
    /**
     * @hidden
     * set up common styles and specific styles based on each facet type
     */
    _setupAdditionalStyles() {
        if (!this.type) {
            return;
        }
        // add type modifier class to host
        this.elementRef.nativeElement.classList.add(`fd-facet--${this.type}`);
        // add margin end and bottom spacings
        this.elementRef.nativeElement.classList.add(`fd-margin-end--md`);
        if (this.type !== 'image') {
            // add bottom margin to non-image facets
            this.elementRef.nativeElement.classList.add(`fd-margin-bottom--sm`);
        }
        switch (this.type) {
            case 'image':
                // image should always be on the left
                this._setStyleToHostElement('order', '-1');
                break;
            case 'rating-indicator': {
                const ratingIndicatorComponent = this.elementRef.nativeElement.querySelector('.fd-rating-indicator');
                if (!ratingIndicatorComponent) {
                    return;
                }
                this._addClassNameToCustomElement(ratingIndicatorComponent, FACET_CLASS_NAME.facetContainer);
                const ratingIndicatorContainer = ratingIndicatorComponent.querySelector('.fd-rating-indicator__container');
                if (!ratingIndicatorContainer) {
                    return;
                }
                this._addClassNameToCustomElement(ratingIndicatorContainer, FACET_CLASS_NAME.facetRatingIndicatorContainer);
                const ratingIndicatorDynamicText = ratingIndicatorComponent.querySelector('.fd-rating-indicator__dynamic-text');
                if (!ratingIndicatorDynamicText) {
                    return;
                }
                this._addClassNameToCustomElement(ratingIndicatorDynamicText, FACET_CLASS_NAME.facetRatingIndicatorDynamicText);
                this._addClassNameToCustomElement(ratingIndicatorDynamicText, FACET_CLASS_NAME.marginTopTiny);
                break;
            }
            case 'form': {
                const formFacetContainer = this.elementRef.nativeElement.querySelectorAll('.fd-facet__container');
                if (!formFacetContainer) {
                    return;
                }
                formFacetContainer.forEach((container, index) => {
                    if (index !== formFacetContainer.length - 1) {
                        this._addClassNameToCustomElement(container, FACET_CLASS_NAME.marginBottomTiny);
                    }
                    // if icon+link is presented, add spacing to the icon
                    const iconComponent = container.querySelector('fd-icon');
                    if (!iconComponent) {
                        return;
                    }
                    this._addClassNameToCustomElement(iconComponent, FACET_CLASS_NAME.marginEndTiny);
                });
                break;
            }
            case 'key-value': {
                // add class to object status
                const objectStatusComponent = this.elementRef.nativeElement.querySelector('.fd-object-status');
                if (!objectStatusComponent) {
                    return;
                }
                this._addClassNameToCustomElement(objectStatusComponent, FACET_CLASS_NAME.facetObjectStatus);
                // add class to override font-family value
                const objectStatusText = objectStatusComponent.querySelector('.fd-object-status__text');
                if (!objectStatusText) {
                    return;
                }
                this._addClassNameToCustomElement(objectStatusText, FACET_CLASS_NAME.facetObjectStatusText);
                // add spacing to object status icon, if present
                const objectStatusIcon = objectStatusComponent.querySelector('.fd-object-status__icon');
                if (!objectStatusIcon) {
                    return;
                }
                this._addClassNameToCustomElement(objectStatusIcon, FACET_CLASS_NAME.paddingNone);
                this._addClassNameToCustomElement(objectStatusIcon, FACET_CLASS_NAME.marginEndTiny);
                break;
            }
            default:
                break;
        }
    }
    /** @hidden
     * adds the logic for `alignEnd` modifier
     */
    _addAlignmentModifier() {
        if (!this.alignEnd) {
            return;
        }
        addClassNameToFacetElement(this._renderer, this.elementRef.nativeElement, 'fd-facet-align-end');
        // add margins to the left after removing existing right margin
        this.elementRef.nativeElement.classList.remove(`fd-margin-end--md`);
        this.elementRef.nativeElement.classList.add(`fd-margin-begin--md`);
    }
    /** @hidden */
    _setStyleToHostElement(attribute, value) {
        this._renderer.setStyle(this.elementRef.nativeElement, attribute, value);
    }
    /** @hidden */
    _addClassNameToCustomElement(element, className) {
        addClassNameToFacetElement(this._renderer, element, className);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: FacetComponent, isStandalone: true, selector: "fd-facet", inputs: { type: "type", facetTitle: "facetTitle", subtitle: "subtitle", headingLevel: "headingLevel", id: "id", alignEnd: "alignEnd" }, host: { properties: { "class.fd-facet": "true", "attr.role": "this.role", "attr.aria-labelledby": "this.ariaLabelledby" } }, ngImport: i0, template: "@if (type === 'image') {\n    <ng-template [ngTemplateOutlet]=\"customContentTemplate\"></ng-template>\n} @else {\n    @if (facetTitle) {\n        <div\n            [attr.role]=\"!!_headingLevel ? 'heading' : null\"\n            [attr.aria-level]=\"_headingLevel\"\n            fd-title\n            [headerSize]=\"5\"\n            class=\"fd-margin-bottom--sm\"\n            [id]=\"titleId\"\n        >\n            {{ facetTitle }}\n        </div>\n    }\n    @if (type === 'form') {\n        <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n    }\n    @if (type === 'key-value' || 'custom') {\n        <ng-template [ngTemplateOutlet]=\"customContentTemplate\"></ng-template>\n    }\n    @if (type === 'rating-indicator') {\n        <span fd-form-label>{{ subtitle }}</span>\n        <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n    }\n}\n<ng-template #contentTemplate>\n    <ng-content select=\"fd-facet-content\"></ng-content>\n</ng-template>\n<ng-template #customContentTemplate>\n    <ng-content></ng-content>\n</ng-template>\n", styles: [".fd-facet{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-facet:after,.fd-facet:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet-group{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;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;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:2rem;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.fd-facet-group:after,.fd-facet-group:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet--image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fd-facet--image-header-title{-ms-flex-item-align:end;align-self:flex-end}.fd-facet--form{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fd-facet--key-value .fd-facet__object-status .fd-facet__object-status-text{font-family:var(--sapFontFamily)}.fd-facet--rating-indicator{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.fd-facet--rating-indicator,.fd-facet--rating-indicator .fd-facet__container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fd-facet--rating-indicator .fd-facet__rating-container{-ms-flex-item-align:start;align-self:flex-start}.fd-facet--rating-indicator .fd-facet__rating-dynamic-text{-ms-flex-item-align:end;align-self:flex-end}.fd-facet__container{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;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-facet__container:after,.fd-facet__container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet__form-value{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapGroup_TitleTextColor);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-facet__form-value:after,.fd-facet__form-value:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet .fd-title{font-family:var(--sapFontFamily);font-size:var(--sapFontLargeSize)}.fd-padding{padding-block:1rem;padding-inline:1rem}.fd-padding-begin-end--tiny{padding-inline:.5rem}.fd-padding-begin-end--sm{padding-inline:1rem}.fd-padding-begin-end--md{padding-inline:2rem}.fd-padding-begin-end--lg{padding-inline:3rem}.fd-padding--none{padding-block:0;padding-inline:0}.fd-padding-responsive--sm{padding-block:0;padding-inline:1rem}.fd-padding-responsive--lg,.fd-padding-responsive--md{padding-block:0;padding-inline:2rem}.fd-padding-responsive--xl{padding-block:0;padding-inline:3rem}.fd-margin--tiny{margin-block:.5rem;margin-inline:.5rem}.fd-margin--sm{margin-block:1rem;margin-inline:1rem}.fd-margin--md{margin-block:2rem;margin-inline:2rem}.fd-margin--lg{margin-block:3rem;margin-inline:3rem}.fd-margin--none{margin-block:0;margin-inline:0}.fd-margin-top--tiny{-webkit-margin-before:.5rem;margin-block-start:.5rem}.fd-margin-top--sm{-webkit-margin-before:1rem;margin-block-start:1rem}.fd-margin-top--md{-webkit-margin-before:2rem;margin-block-start:2rem}.fd-margin-top--lg{-webkit-margin-before:3rem;margin-block-start:3rem}.fd-margin-top--none{-webkit-margin-before:0;margin-block-start:0}.fd-margin-end--tiny{-webkit-margin-end:.5rem;margin-inline-end:.5rem}.fd-margin-end--sm{-webkit-margin-end:1rem;margin-inline-end:1rem}.fd-margin-end--md{-webkit-margin-end:2rem;margin-inline-end:2rem}.fd-margin-end--lg{-webkit-margin-end:3rem;margin-inline-end:3rem}.fd-margin-end--none{-webkit-margin-end:0;margin-inline-end:0}.fd-margin-bottom--tiny{-webkit-margin-after:.5rem;margin-block-end:.5rem}.fd-margin-bottom--sm{-webkit-margin-after:1rem;margin-block-end:1rem}.fd-margin-bottom--md{-webkit-margin-after:2rem;margin-block-end:2rem}.fd-margin-bottom--lg{-webkit-margin-after:3rem;margin-block-end:3rem}.fd-margin-bottom--none{-webkit-margin-after:0;margin-block-end:0}.fd-margin-begin--tiny{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-margin-begin--sm{-webkit-margin-start:1rem;margin-inline-start:1rem}.fd-margin-begin--md{-webkit-margin-start:2rem;margin-inline-start:2rem}.fd-margin-begin--lg{-webkit-margin-start:3rem;margin-inline-start:3rem}.fd-margin-begin--none{-webkit-margin-start:0;margin-inline-start:0}.fd-margin-top-bottom--tiny{margin-block:.5rem}.fd-margin-top-bottom--sm{margin-block:1rem}.fd-margin-top-bottom--md{margin-block:2rem}.fd-margin-top-bottom--lg{margin-block:3rem}.fd-margin-begin-end--tiny{margin-inline:.5rem}.fd-margin-begin-end--sm{margin-inline:1rem}.fd-margin-begin-end--md{margin-inline:2rem}.fd-margin-begin-end--lg{margin-inline:3rem}.fd-margin-responsive--sm{margin-block:0 1rem;margin-inline:0}.fd-margin-responsive--md{margin-block:1rem;margin-inline:1rem}.fd-margin-responsive--lg{margin-block:1rem;margin-inline:2rem}.fd-margin-responsive--xl{margin-block:1rem;margin-inline:3rem}.fd-margin-negative-begin-end--tiny{margin-block:0;margin-inline:-.5rem}.fd-margin-negative-begin-end--sm{margin-block:0;margin-inline:-1rem}.fd-margin-negative-begin-end--md{margin-block:0;margin-inline:-2rem}.fd-margin-negative-begin-end--lg{margin-block:0;margin-inline:-3rem}\n/*! Bundled license information:\n\nfundamental-styles/dist/margins.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 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"] }, { kind: "component", type: TitleComponent, selector: "[fd-title], [fdTitle]", inputs: ["twoLineClamp", "headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: FormLabelComponent, selector: "[fd-form-label]", inputs: ["required", "colon", "alignLabelEnd", "inlineHelpContent", "inlineHelpGlyph", "inlineHelpTriggers", "inlineHelpBodyPlacement", "inlineHelpPlacement", "allowWrap", "inlineHelpLabel", "id", "disabled", "unitDescription", "independent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FacetComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-facet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
                        '[class.fd-facet]': 'true'
                    }, imports: [NgTemplateOutlet, TitleComponent, FormLabelComponent], template: "@if (type === 'image') {\n    <ng-template [ngTemplateOutlet]=\"customContentTemplate\"></ng-template>\n} @else {\n    @if (facetTitle) {\n        <div\n            [attr.role]=\"!!_headingLevel ? 'heading' : null\"\n            [attr.aria-level]=\"_headingLevel\"\n            fd-title\n            [headerSize]=\"5\"\n            class=\"fd-margin-bottom--sm\"\n            [id]=\"titleId\"\n        >\n            {{ facetTitle }}\n        </div>\n    }\n    @if (type === 'form') {\n        <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n    }\n    @if (type === 'key-value' || 'custom') {\n        <ng-template [ngTemplateOutlet]=\"customContentTemplate\"></ng-template>\n    }\n    @if (type === 'rating-indicator') {\n        <span fd-form-label>{{ subtitle }}</span>\n        <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n    }\n}\n<ng-template #contentTemplate>\n    <ng-content select=\"fd-facet-content\"></ng-content>\n</ng-template>\n<ng-template #customContentTemplate>\n    <ng-content></ng-content>\n</ng-template>\n", styles: [".fd-facet{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-facet:after,.fd-facet:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet-group{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;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;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:2rem;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.fd-facet-group:after,.fd-facet-group:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet--image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fd-facet--image-header-title{-ms-flex-item-align:end;align-self:flex-end}.fd-facet--form{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fd-facet--key-value .fd-facet__object-status .fd-facet__object-status-text{font-family:var(--sapFontFamily)}.fd-facet--rating-indicator{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.fd-facet--rating-indicator,.fd-facet--rating-indicator .fd-facet__container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fd-facet--rating-indicator .fd-facet__rating-container{-ms-flex-item-align:start;align-self:flex-start}.fd-facet--rating-indicator .fd-facet__rating-dynamic-text{-ms-flex-item-align:end;align-self:flex-end}.fd-facet__container{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;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-facet__container:after,.fd-facet__container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet__form-value{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapGroup_TitleTextColor);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-facet__form-value:after,.fd-facet__form-value:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-facet .fd-title{font-family:var(--sapFontFamily);font-size:var(--sapFontLargeSize)}.fd-padding{padding-block:1rem;padding-inline:1rem}.fd-padding-begin-end--tiny{padding-inline:.5rem}.fd-padding-begin-end--sm{padding-inline:1rem}.fd-padding-begin-end--md{padding-inline:2rem}.fd-padding-begin-end--lg{padding-inline:3rem}.fd-padding--none{padding-block:0;padding-inline:0}.fd-padding-responsive--sm{padding-block:0;padding-inline:1rem}.fd-padding-responsive--lg,.fd-padding-responsive--md{padding-block:0;padding-inline:2rem}.fd-padding-responsive--xl{padding-block:0;padding-inline:3rem}.fd-margin--tiny{margin-block:.5rem;margin-inline:.5rem}.fd-margin--sm{margin-block:1rem;margin-inline:1rem}.fd-margin--md{margin-block:2rem;margin-inline:2rem}.fd-margin--lg{margin-block:3rem;margin-inline:3rem}.fd-margin--none{margin-block:0;margin-inline:0}.fd-margin-top--tiny{-webkit-margin-before:.5rem;margin-block-start:.5rem}.fd-margin-top--sm{-webkit-margin-before:1rem;margin-block-start:1rem}.fd-margin-top--md{-webkit-margin-before:2rem;margin-block-start:2rem}.fd-margin-top--lg{-webkit-margin-before:3rem;margin-block-start:3rem}.fd-margin-top--none{-webkit-margin-before:0;margin-block-start:0}.fd-margin-end--tiny{-webkit-margin-end:.5rem;margin-inline-end:.5rem}.fd-margin-end--sm{-webkit-margin-end:1rem;margin-inline-end:1rem}.fd-margin-end--md{-webkit-margin-end:2rem;margin-inline-end:2rem}.fd-margin-end--lg{-webkit-margin-end:3rem;margin-inline-end:3rem}.fd-margin-end--none{-webkit-margin-end:0;margin-inline-end:0}.fd-margin-bottom--tiny{-webkit-margin-after:.5rem;margin-block-end:.5rem}.fd-margin-bottom--sm{-webkit-margin-after:1rem;margin-block-end:1rem}.fd-margin-bottom--md{-webkit-margin-after:2rem;margin-block-end:2rem}.fd-margin-bottom--lg{-webkit-margin-after:3rem;margin-block-end:3rem}.fd-margin-bottom--none{-webkit-margin-after:0;margin-block-end:0}.fd-margin-begin--tiny{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-margin-begin--sm{-webkit-margin-start:1rem;margin-inline-start:1rem}.fd-margin-begin--md{-webkit-margin-start:2rem;margin-inline-start:2rem}.fd-margin-begin--lg{-webkit-margin-start:3rem;margin-inline-start:3rem}.fd-margin-begin--none{-webkit-margin-start:0;margin-inline-start:0}.fd-margin-top-bottom--tiny{margin-block:.5rem}.fd-margin-top-bottom--sm{margin-block:1rem}.fd-margin-top-bottom--md{margin-block:2rem}.fd-margin-top-bottom--lg{margin-block:3rem}.fd-margin-begin-end--tiny{margin-inline:.5rem}.fd-margin-begin-end--sm{margin-inline:1rem}.fd-margin-begin-end--md{margin-inline:2rem}.fd-margin-begin-end--lg{margin-inline:3rem}.fd-margin-responsive--sm{margin-block:0 1rem;margin-inline:0}.fd-margin-responsive--md{margin-block:1rem;margin-inline:1rem}.fd-margin-responsive--lg{margin-block:1rem;margin-inline:2rem}.fd-margin-responsive--xl{margin-block:1rem;margin-inline:3rem}.fd-margin-negative-begin-end--tiny{margin-block:0;margin-inline:-.5rem}.fd-margin-negative-begin-end--sm{margin-block:0;margin-inline:-1rem}.fd-margin-negative-begin-end--md{margin-block:0;margin-inline:-2rem}.fd-margin-negative-begin-end--lg{margin-block:0;margin-inline:-3rem}\n/*! Bundled license information:\n\nfundamental-styles/dist/margins.css:\n  (*!\n   * Fundamental Library Styles v0.41.7\n   * Copyright (c) 2026 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"] }]
        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { type: [{
                type: Input
            }], facetTitle: [{
                type: Input
            }], subtitle: [{
                type: Input
            }], headingLevel: [{
                type: Input
            }], id: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.role']
            }], alignEnd: [{
                type: Input
            }], role: [{
                type: HostBinding,
                args: ['attr.role']
            }], ariaLabelledby: [{
                type: HostBinding,
                args: ['attr.aria-labelledby']
            }] } });

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

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

export { FACET_CLASS_NAME, FacetComponent, FacetContainerComponent, FacetContentComponent, FacetGroupComponent, FacetModule, addClassNameToFacetElement };
//# sourceMappingURL=fundamental-ngx-core-facets.mjs.map
