import { Component, Input } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { CommonModule, NgTemplateOutlet } from '@angular/common';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatButtonModule } from '@angular/material/button';
import { MatRippleModule } from '@angular/material/core';
import { TranslateModule } from "@ngx-translate/core";
import * as i0 from "@angular/core";
import * as i1 from "@testlocallibrary/shared-kernel/services/language";
import * as i2 from "@angular/common";
import * as i3 from "@angular/material/icon";
import * as i4 from "@angular/material/tooltip";
import * as i5 from "@angular/material/button";
import * as i6 from "@ngx-translate/core";
export class LdcButtonComponent {
    constructor(languageService) {
        this.languageService = languageService;
        this.currentLanguage = this.languageService.getLanguage();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LdcButtonComponent, deps: [{ token: i1.LanguageService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LdcButtonComponent, isStandalone: true, selector: "lib-ldc-button", inputs: { config: "config" }, ngImport: i0, template: "<button\r\n  [id]=\"'btn_' + config.id + '_' + currentLanguage\"\r\n  *ngIf=\"config.matType != 'anchor' || config.isLdcButton\"\r\n  (click)=\"config.onClick ? config.onClick(config) : null\"\r\n  [class]=\"\r\n    (config.className || '') +\r\n    (config.isLdcButton ? ' ldc-btn ldc-btn-' + config.color : '') +\r\n    (config.isLdcStatus ? ' ldc-status ' + config.className : '')\r\n  \"\r\n  [class.loading]=\"config.isLoading\"\r\n  [type]=\"config.type\"\r\n  [color]=\"config.color\"\r\n  mat-button\r\n  [matTooltipPosition]=\"config.toolTip?.position || 'above'\"\r\n  [matTooltip]=\"config.toolTip?.toolTip || ''\"\r\n  [disabled]=\"config.isDisabled || config.isLoading\"\r\n  [ngClass]=\"{\r\n    'ldc-btn-rounded-pill': config.isLdcButtonRoundedPill,\r\n    'mat-mdc-button mat-mdc-raised-button':config.matType==='raised',\r\n    'mat-mdc-button mdc-button--outlined mat-mdc-outlined-button':config.matType==='stroked',\r\n    'mat-mdc-unelevated-button':config.matType==='flat',\r\n  }\"\r\n>\r\n  <ng-container *ngIf=\"!config.content; else buttonContent\">\r\n    <ng-container *ngIf=\"!config.isLoading; else loadingButton\">\r\n      <div class=\"d-flex align-items-center justify-content-center\">\r\n        <mat-icon *ngIf=\"config.icon\">{{ config.icon }}</mat-icon>\r\n        <mat-icon *ngIf=\"config.svgIcon\" [svgIcon]=\"config.svgIcon\"></mat-icon>\r\n        <span class=\"mx-icon\" *ngIf=\"config.icon && config.text\"></span>\r\n        <span *ngIf=\"config.text\">{{ config.text | translate }}</span>\r\n      </div>\r\n    </ng-container>\r\n    <ng-template #loadingButton>\r\n      <span\r\n        [ngClass]=\"config.spinnerColor\"\r\n        aria-hidden=\"true\"\r\n        class=\"spinner-border spinner-border-sm\"\r\n        role=\"status\"\r\n      ></span>\r\n    </ng-template>\r\n  </ng-container>\r\n  <ng-template #buttonContent>\r\n    <ng-container\r\n      [ngTemplateOutlet]=\"config.content!\"\r\n      [ngTemplateOutletContext]=\"{ item: config }\"\r\n    >\r\n    </ng-container>\r\n  </ng-template>\r\n</button>\r\n\r\n<a\r\n  *ngIf=\"config.matType === 'anchor'\"\r\n  [href]=\"config.url\"\r\n  [target]=\"config.target\"\r\n  [class]=\"config.className\"\r\n  [class.loading]=\"config.isLoading\"\r\n  [color]=\"config.color\"\r\n  mat-stroked-button\r\n  [matTooltipPosition]=\"config.toolTip?.position || 'above'\"\r\n  [matTooltip]=\"config.toolTip?.toolTip || ''\"\r\n  [attr.aria-disabled]=\"config.isDisabled || config.isLoading\"\r\n>\r\n  {{ (config.text || '')  | translate }}\r\n</a>\r\n", styles: ["button{font-family:Noto Kufi Arabic,sans-serif;font-size:16px}.loading{position:relative}.loading:before{content:\"\";position:absolute;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;border-radius:50%;border:2px solid transparent;border-top-color:#000;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}::ng-deep .mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: #fff !important}::ng-deep .mat-mdc-raised-button.mat-primary,.mat-mdc-unelevated-button.mat-primary{--mdc-protected-button-label-text-color: #fff !important;padding:22px 0!important}.mx-icon{margin:0 2px}.w-45{width:45%}.w-30{width:24%}@media screen and (max-width: 768px){.w-30{width:64%}}@media screen and (max-width: 576px){.w-30{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LdcButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'lib-ldc-button', standalone: true, imports: [
                        CommonModule,
                        MatIconModule,
                        MatTooltipModule,
                        MatButtonModule,
                        MatRippleModule,
                        NgTemplateOutlet,
                        TranslateModule,
                    ], template: "<button\r\n  [id]=\"'btn_' + config.id + '_' + currentLanguage\"\r\n  *ngIf=\"config.matType != 'anchor' || config.isLdcButton\"\r\n  (click)=\"config.onClick ? config.onClick(config) : null\"\r\n  [class]=\"\r\n    (config.className || '') +\r\n    (config.isLdcButton ? ' ldc-btn ldc-btn-' + config.color : '') +\r\n    (config.isLdcStatus ? ' ldc-status ' + config.className : '')\r\n  \"\r\n  [class.loading]=\"config.isLoading\"\r\n  [type]=\"config.type\"\r\n  [color]=\"config.color\"\r\n  mat-button\r\n  [matTooltipPosition]=\"config.toolTip?.position || 'above'\"\r\n  [matTooltip]=\"config.toolTip?.toolTip || ''\"\r\n  [disabled]=\"config.isDisabled || config.isLoading\"\r\n  [ngClass]=\"{\r\n    'ldc-btn-rounded-pill': config.isLdcButtonRoundedPill,\r\n    'mat-mdc-button mat-mdc-raised-button':config.matType==='raised',\r\n    'mat-mdc-button mdc-button--outlined mat-mdc-outlined-button':config.matType==='stroked',\r\n    'mat-mdc-unelevated-button':config.matType==='flat',\r\n  }\"\r\n>\r\n  <ng-container *ngIf=\"!config.content; else buttonContent\">\r\n    <ng-container *ngIf=\"!config.isLoading; else loadingButton\">\r\n      <div class=\"d-flex align-items-center justify-content-center\">\r\n        <mat-icon *ngIf=\"config.icon\">{{ config.icon }}</mat-icon>\r\n        <mat-icon *ngIf=\"config.svgIcon\" [svgIcon]=\"config.svgIcon\"></mat-icon>\r\n        <span class=\"mx-icon\" *ngIf=\"config.icon && config.text\"></span>\r\n        <span *ngIf=\"config.text\">{{ config.text | translate }}</span>\r\n      </div>\r\n    </ng-container>\r\n    <ng-template #loadingButton>\r\n      <span\r\n        [ngClass]=\"config.spinnerColor\"\r\n        aria-hidden=\"true\"\r\n        class=\"spinner-border spinner-border-sm\"\r\n        role=\"status\"\r\n      ></span>\r\n    </ng-template>\r\n  </ng-container>\r\n  <ng-template #buttonContent>\r\n    <ng-container\r\n      [ngTemplateOutlet]=\"config.content!\"\r\n      [ngTemplateOutletContext]=\"{ item: config }\"\r\n    >\r\n    </ng-container>\r\n  </ng-template>\r\n</button>\r\n\r\n<a\r\n  *ngIf=\"config.matType === 'anchor'\"\r\n  [href]=\"config.url\"\r\n  [target]=\"config.target\"\r\n  [class]=\"config.className\"\r\n  [class.loading]=\"config.isLoading\"\r\n  [color]=\"config.color\"\r\n  mat-stroked-button\r\n  [matTooltipPosition]=\"config.toolTip?.position || 'above'\"\r\n  [matTooltip]=\"config.toolTip?.toolTip || ''\"\r\n  [attr.aria-disabled]=\"config.isDisabled || config.isLoading\"\r\n>\r\n  {{ (config.text || '')  | translate }}\r\n</a>\r\n", styles: ["button{font-family:Noto Kufi Arabic,sans-serif;font-size:16px}.loading{position:relative}.loading:before{content:\"\";position:absolute;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;border-radius:50%;border:2px solid transparent;border-top-color:#000;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}::ng-deep .mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: #fff !important}::ng-deep .mat-mdc-raised-button.mat-primary,.mat-mdc-unelevated-button.mat-primary{--mdc-protected-button-label-text-color: #fff !important;padding:22px 0!important}.mx-icon{margin:0 2px}.w-45{width:45%}.w-30{width:24%}@media screen and (max-width: 768px){.w-30{width:64%}}@media screen and (max-width: 576px){.w-30{width:100%}}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.LanguageService }]; }, propDecorators: { config: [{
                type: Input,
                args: [{ required: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64, 