import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@seniorsistemas/angular-components/badge";
import * as i2 from "@angular/common";
import * as i3 from "@ngx-translate/core";
import * as i4 from "@seniorsistemas/angular-components/locale";
import * as i5 from "@seniorsistemas/angular-components/numeric";
/**
 * @description Componente de exibição de par label/valor que suporta diferentes
 * tipos de conteúdo configurados via `LabelValueConfiguration`: texto, número,
 * moeda, data e badge.
 *
 * @example
 * ```html
 * <s-label-value [configuration]="{ type: 'Text', label: 'Nome', value: 'João' }" />
 * ```
 *
 * @category Summary
 */
export class LabelValueComponent {
    /** @description Configuração do par label/valor, incluindo tipo e dados para renderização. Campo obrigatório. */
    configuration;
    isBadgeConfiguration(config) {
        return config.type === 'Badge';
    }
    isTextConfiguration(config) {
        return config.type === 'Text';
    }
    isCurrencyConfiguration(config) {
        return config.type === 'Currency';
    }
    isNumberConfiguration(config) {
        return config.type === 'Number';
    }
    isDateConfiguration(config) {
        return config.type === 'Date';
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LabelValueComponent, selector: "s-label-value", inputs: { configuration: "configuration" }, ngImport: i0, template: "<div class=\"flex flex-col\">\n    <p class=\"font-bold\">\n        {{ configuration.title }}\n    </p>\n\n    @if (configuration.value) {\n        @if (isTextConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value }}\n            </span>\n        }\n\n        @if (isBadgeConfiguration(configuration)) {\n            @for (badge of configuration.value; track $index) {\n                <s-badge\n                    [type]=\"badge.type ?? 'pill'\"\n                    [color]=\"badge.color ?? 'blue'\"\n                    [text]=\"badge.text\"\n                    [iconClass]=\"badge.iconClass\"\n                    [iconPosition]=\"badge.iconPosition\"\n                ></s-badge>\n            }\n        }\n\n        @if (isCurrencyConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value | numeric: { numberFormatOptions: { style: 'currency', currency: configuration.currency } } | async }}\n            </span>\n        }\n\n        @if (isNumberConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value | localizedNumber | async }}\n            </span>\n        }\n\n        @if (isDateConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value | localizedDate: configuration.format || 'L' | async }}\n            </span>\n        }\n    } @else {\n        <span class=\"sds-empty-value\">\n            {{ 'platform.angular_components.not_informed' | translate }}\n        </span>\n    }\n</div>\n", styles: [".flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}\n"], dependencies: [{ kind: "component", type: i1.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: i4.LocalizedDatePipe, name: "localizedDate" }, { kind: "pipe", type: i4.LocalizedNumberPipe, name: "localizedNumber" }, { kind: "pipe", type: i5.NumericPipe, name: "numeric" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelValueComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-label-value', template: "<div class=\"flex flex-col\">\n    <p class=\"font-bold\">\n        {{ configuration.title }}\n    </p>\n\n    @if (configuration.value) {\n        @if (isTextConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value }}\n            </span>\n        }\n\n        @if (isBadgeConfiguration(configuration)) {\n            @for (badge of configuration.value; track $index) {\n                <s-badge\n                    [type]=\"badge.type ?? 'pill'\"\n                    [color]=\"badge.color ?? 'blue'\"\n                    [text]=\"badge.text\"\n                    [iconClass]=\"badge.iconClass\"\n                    [iconPosition]=\"badge.iconPosition\"\n                ></s-badge>\n            }\n        }\n\n        @if (isCurrencyConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value | numeric: { numberFormatOptions: { style: 'currency', currency: configuration.currency } } | async }}\n            </span>\n        }\n\n        @if (isNumberConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value | localizedNumber | async }}\n            </span>\n        }\n\n        @if (isDateConfiguration(configuration)) {\n            <span class=\"sds-readonly\">\n                {{ configuration.value | localizedDate: configuration.format || 'L' | async }}\n            </span>\n        }\n    } @else {\n        <span class=\"sds-empty-value\">\n            {{ 'platform.angular_components.not_informed' | translate }}\n        </span>\n    }\n</div>\n", styles: [".flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}\n"] }]
        }], propDecorators: { configuration: [{
                type: Input,
                args: [{ required: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64, 