import { Component, input, viewChild } from '@angular/core';
import { DbxClickToCopyTextDirective } from './copy.text.directive';
import { MatIcon } from '@angular/material/icon';
import * as i0 from "@angular/core";
export class DbxClickToCopyTextComponent {
    contentElementRef = viewChild('content');
    dbxClickToCopyText = viewChild(DbxClickToCopyTextDirective);
    copyText = input(undefined);
    highlighted = input(false);
    clipboardSnackbarMessagesConfig = input(undefined);
    clipboardSnackbarMessagesEnabled = input(true);
    clickToCopyIcon = input('content_copy');
    clickIconToCopyOnly = input(false);
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxClickToCopyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxClickToCopyTextComponent, isStandalone: true, selector: "dbx-click-to-copy-text", inputs: { copyText: { classPropertyName: "copyText", publicName: "copyText", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesConfig: { classPropertyName: "clipboardSnackbarMessagesConfig", publicName: "clipboardSnackbarMessagesConfig", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesEnabled: { classPropertyName: "clipboardSnackbarMessagesEnabled", publicName: "clipboardSnackbarMessagesEnabled", isSignal: true, isRequired: false, transformFunction: null }, clickToCopyIcon: { classPropertyName: "clickToCopyIcon", publicName: "clickToCopyIcon", isSignal: true, isRequired: false, transformFunction: null }, clickIconToCopyOnly: { classPropertyName: "clickIconToCopyOnly", publicName: "clickIconToCopyOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-click-to-copy-text-component" }, viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "dbxClickToCopyText", first: true, predicate: DbxClickToCopyTextDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
    <span #content [dbxClickToCopyText]="copyText()" [disableCopy]="clickIconToCopyOnly()" [highlighted]="highlighted()" [clipboardSnackbarMessagesEnabled]="clipboardSnackbarMessagesEnabled()" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig()" [copyTextFromElement]="contentElementRef()">
      <ng-content></ng-content>
    </span>
    <mat-icon class="dbx-click-to-copy-text-icon" (click)="dbxClickToCopyText()?._copyText()">{{ clickToCopyIcon() }}</mat-icon>
  `, isInline: true, dependencies: [{ kind: "directive", type: DbxClickToCopyTextDirective, selector: "[dbxClickToCopyText]", inputs: ["copyTextFromElement", "dbxClickToCopyText", "disableCopy", "highlighted"], outputs: ["copyTextFromElementChange"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxClickToCopyTextComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'dbx-click-to-copy-text',
                    template: `
    <span #content [dbxClickToCopyText]="copyText()" [disableCopy]="clickIconToCopyOnly()" [highlighted]="highlighted()" [clipboardSnackbarMessagesEnabled]="clipboardSnackbarMessagesEnabled()" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig()" [copyTextFromElement]="contentElementRef()">
      <ng-content></ng-content>
    </span>
    <mat-icon class="dbx-click-to-copy-text-icon" (click)="dbxClickToCopyText()?._copyText()">{{ clickToCopyIcon() }}</mat-icon>
  `,
                    host: {
                        class: 'dbx-click-to-copy-text-component'
                    },
                    imports: [DbxClickToCopyTextDirective, MatIcon],
                    standalone: true
                }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29weS50ZXh0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2Rie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