import { NgTemplateOutlet } from '@angular/common';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { MatButtonModule, MatIconButton } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { AbstractDbxButtonDirective, provideDbxButton } from '@dereekb/dbx-core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/button";
import * as i2 from "@angular/material/icon";
/**
 * Simple dbx-button that displays a button with an icon.
 */
export class DbxIconButtonComponent extends AbstractDbxButtonDirective {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxIconButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxIconButtonComponent, isStandalone: true, selector: "dbx-icon-button", host: { classAttribute: "dbx-icon-button" }, providers: provideDbxButton(DbxIconButtonComponent), usesInheritance: true, ngImport: i0, template: `
    @switch (buttonDisplayTypeSignal()) {
      @case ('text_button') {
        <button mat-button class="mat-unthemed" [disabled]="disabledSignal()" (click)="clickButton()">
          @if (iconSignal()) {
            <mat-icon class="dbx-icon-spacer">{{ iconSignal() }}</mat-icon>
          }
          <span>{{ textSignal() }}</span>
          <ng-container *ngTemplateOutlet="content"></ng-container>
        </button>
      }
      @case ('icon_button') {
        <button mat-icon-button [disabled]="disabledSignal()" (click)="clickButton()">
          <mat-icon>{{ iconSignal() }}</mat-icon>
          <ng-container *ngTemplateOutlet="content"></ng-container>
        </button>
      }
    }
    <ng-template #content>
      <ng-content></ng-content>
    </ng-template>
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", exportAs: ["matButton"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxIconButtonComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-icon-button',
                    template: `
    @switch (buttonDisplayTypeSignal()) {
      @case ('text_button') {
        <button mat-button class="mat-unthemed" [disabled]="disabledSignal()" (click)="clickButton()">
          @if (iconSignal()) {
            <mat-icon class="dbx-icon-spacer">{{ iconSignal() }}</mat-icon>
          }
          <span>{{ textSignal() }}</span>
          <ng-container *ngTemplateOutlet="content"></ng-container>
        </button>
      }
      @case ('icon_button') {
        <button mat-icon-button [disabled]="disabledSignal()" (click)="clickButton()">
          <mat-icon>{{ iconSignal() }}</mat-icon>
          <ng-container *ngTemplateOutlet="content"></ng-container>
        </button>
      }
    }
    <ng-template #content>
      <ng-content></ng-content>
    </ng-template>
  `,
                    providers: provideDbxButton(DbxIconButtonComponent),
                    host: {
                        class: 'dbx-icon-button'
                    },
                    imports: [MatButtonModule, MatIconModule, MatIconButton, NgTemplateOutlet],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    standalone: true
                }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi5idXR0b24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZGJ4LXdlYi9zcmMvbGliL2J1dHRvbi9pY29uL2ljb24uYnV0dG9uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQ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