import { SymbolRegistry, apErrorFill, apRoundedCheckFill, SymbolComponent } from '@agorapulse/ui-symbol';
import * as i0 from '@angular/core';
import { signal, computed, inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';

class FormMessageComponent {
    set messageType(messageType) {
        this.messageTypeSignal.set(messageType);
    }
    message;
    messageTypeSignal = signal('error', ...(ngDevMode ? [{ debugName: "messageTypeSignal" }] : []));
    symbolIdSignal = computed(() => {
        return this.messageTypeSignal() === 'error' ? 'error_fill' : 'rounded-check_fill';
    }, ...(ngDevMode ? [{ debugName: "symbolIdSignal" }] : []));
    symbolRegistry = inject(SymbolRegistry);
    constructor() {
        this.symbolRegistry.registerSymbols([apErrorFill, apRoundedCheckFill]);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FormMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: FormMessageComponent, isStandalone: true, selector: "ap-form-message", inputs: { messageType: "messageType", message: "message" }, host: { properties: { "class.error": "messageTypeSignal() === 'error'", "class.success": "messageTypeSignal() === 'success'" }, classAttribute: "ap-form-message" }, ngImport: i0, template: "<ap-symbol\n    size=\"sm\"\n    [symbolId]=\"symbolIdSignal()\" />\n<span>\n    {{ message }}\n</span>\n", styles: [".ap-form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;align-items:center;gap:var(--ref-spacing-xxxs)}.ap-form-message.error{color:var(--comp-forms-status-text-error-color)}.ap-form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.ap-form-message.success{color:var(--comp-forms-status-text-success-color)}.ap-form-message.success ap-symbol{color:var(--ref-color-green-150)}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FormMessageComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ap-form-message', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SymbolComponent], host: {
                        class: 'ap-form-message',
                        '[class.error]': "messageTypeSignal() === 'error'",
                        '[class.success]': "messageTypeSignal() === 'success'",
                    }, template: "<ap-symbol\n    size=\"sm\"\n    [symbolId]=\"symbolIdSignal()\" />\n<span>\n    {{ message }}\n</span>\n", styles: [".ap-form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;align-items:center;gap:var(--ref-spacing-xxxs)}.ap-form-message.error{color:var(--comp-forms-status-text-error-color)}.ap-form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.ap-form-message.success{color:var(--comp-forms-status-text-success-color)}.ap-form-message.success ap-symbol{color:var(--ref-color-green-150)}\n"] }]
        }], ctorParameters: () => [], propDecorators: { messageType: [{
                type: Input,
                args: [{ required: true }]
            }], message: [{
                type: Input,
                args: [{ required: true }]
            }] } });

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

export { FormMessageComponent };
//# sourceMappingURL=agorapulse-ui-components-form-message.mjs.map
