import { __decorate, __metadata } from "tslib";
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LayoutComponentBase } from '@anglr/dynamic/layout';
import { LayoutEditorMetadata } from '@anglr/dynamic/layout-editor';
import { DebugData, DynamicOutput } from '@anglr/dynamic/relations';
import { RelationsEditorMetadata } from '@anglr/dynamic/relations-editor';
import { HostDisplayBlockStyle } from '@anglr/common';
import { nameof } from '@jscrpt/common';
import { ButtonLayoutMetadataLoader, ButtonRelationsMetadataLoader } from './button.metadata';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
/**
 * Component used for displaying button
 */
let ButtonSAComponent = class ButtonSAComponent extends LayoutComponentBase {
    constructor() {
        super(...arguments);
        //######################### public properties - inputs #########################
        /**
         * Indication whether is button disabled
         */
        this.disabled = false;
        //######################### public properties - dynamic outputs #########################
        /**
         * Output used for emitting new void object value when clicked
         */
        this.click = {};
    }
    //######################### protected - overrides #########################
    /**
     * @inheritdoc
     */
    onOptionsSet() {
        this.disabled = this.options?.disabled ?? false;
    }
};
ButtonSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ButtonSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
ButtonSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ButtonSAComponent, isStandalone: true, selector: "button-component", inputs: { disabled: "disabled" }, usesInheritance: true, ngImport: i0, template: "<button type=\"button\" [disabled]=\"disabled\" [ngClass]=\"options?.buttonCssClass ?? ''\" (click)=\"click = {}\">\n    <span>{{options?.text}}</span>\n</button>", styles: [":host{display: block;}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
__decorate([
    DynamicOutput({ skipInit: true, sync: true }),
    __metadata("design:type", Object)
], ButtonSAComponent.prototype, "click", void 0);
ButtonSAComponent = __decorate([
    DebugData({
        inputs: [
            nameof('disabled'),
        ],
        outputs: [
            nameof('click'),
        ],
    }),
    RelationsEditorMetadata(ButtonRelationsMetadataLoader),
    LayoutEditorMetadata(ButtonLayoutMetadataLoader)
], ButtonSAComponent);
export { ButtonSAComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ButtonSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'button-component', standalone: true, imports: [
                        CommonModule,
                    ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\" [disabled]=\"disabled\" [ngClass]=\"options?.buttonCssClass ?? ''\" (click)=\"click = {}\">\n    <span>{{options?.text}}</span>\n</button>", styles: [":host{display: block;}"] }]
        }], propDecorators: { disabled: [{
                type: Input
            }], click: [] } });
//# sourceMappingURL=button.component.js.map