import { Component, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/material/menu';
import * as i0 from "@angular/core";
import * as i1 from "../../../_helpers/utils";
import * as i2 from "@angular/common";
import * as i3 from "@angular/material/button";
import * as i4 from "@angular/material/menu";
export class MaterialSummaryItemComponent {
    constructor(utils) {
        this.utils = utils;
        this.menuIconOverride$ = '';
        this.imagePath$ = '';
    }
    ngOnInit() {
        this.imagePath$ = this.utils.getIconPath(this.utils.getSDKStaticContentUrl());
        this.settingsSvgIcon$ = this.utils.getImageSrc('more', this.utils.getSDKStaticContentUrl());
        if (this.menuIconOverride$ != '') {
            this.menuIconOverride$ = this.utils.getImageSrc(this.menuIconOverride$, this.utils.getSDKStaticContentUrl());
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MaterialSummaryItemComponent, deps: [{ token: i1.Utils }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MaterialSummaryItemComponent, isStandalone: true, selector: "app-material-summary-item", inputs: { item$: "item$", menuIconOverride$: "menuIconOverride$", menuIconOverrideAction$: "menuIconOverrideAction$" }, ngImport: i0, template: "<div class=\"psdk-utility-card\">\n  <div class=\"psdk-utility-card-icon\">\n    <img class=\"psdk-utility-card-svg-icon\" src=\"{{ imagePath$ }}{{ item$.visual.icon }}.svg\" />\n  </div>\n  <div class=\"psdk-utility-card-main\">\n    <div *ngIf=\"item$.primary.type == 'URL'\" class=\"psdk-utility-card-main-primary-url\">\n      <button mat-button color=\"primary\" (click)=\"item$.primary.click()\">\n        {{ item$.primary.name }}&nbsp;\n        <img class=\"psdk-utility-card-actions-svg-icon\" src=\"{{ imagePath$ }}{{ item$.primary.icon }}.svg\" />\n      </button>\n    </div>\n    <div *ngIf=\"item$.primary.type != 'URL'\" class=\"psdk-utility-card-main-primary-label\">\n      {{ item$.primary.name }}\n    </div>\n    <div *ngIf=\"item$.secondary.text != ''\" [style.color]=\"item$.secondary.error ? 'red' : undefined\">{{ item$.secondary.text }}</div>\n  </div>\n  <div class=\"psdk-utility-card-actions\">\n    <div *ngIf=\"menuIconOverride$ == ''; else showCustom\">\n      <button id=\"setting-button\" mat-icon-button [matMenuTriggerFor]=\"actionMenu\">\n        <img class=\"psdk-utility-card-action-svg-icon\" src=\"{{ settingsSvgIcon$ }}\" />\n      </button>\n      <mat-menu #actionMenu=\"matMenu\" overlapTrigger=\"false\">\n        <ng-container *ngFor=\"let action of item$.actions\">\n          <button mat-menu-item (click)=\"action.onClick()\">\n            <img class=\"psdk-utility-card-action-actions-svg-icon\" src=\"{{ imagePath$ }}{{ action.icon }}.svg\" />&nbsp;\n            {{ action.text }}\n          </button>\n        </ng-container>\n      </mat-menu>\n    </div>\n    <ng-template #showCustom>\n      <button id=\"delete-attachment\" mat-icon-button (click)=\"menuIconOverrideAction$.onClick(item$)\">\n        <img class=\"psdk-utility-card-action-svg-icon\" src=\"{{ menuIconOverride$ }}\" />\n      </button>\n    </ng-template>\n  </div>\n</div>\n", styles: [".psdk-icon{padding:0rem .125rem;min-width:unset}.psdk-utility-divider{border-bottom:.0625rem solid var(--app-neutral-light-color)}.psdk-utility-view-all{width:100%;display:flex;justify-content:center}.psdk-utility-count{background:var(--app-primary-light-color);border-radius:.5625rem;color:var(--app-inverse-form-color);display:inline-block;font-size:.75rem;font-weight:700;text-align:center;width:1.125rem;vertical-align:top;margin:0 0 .313rem 1rem}.psdk-utility .header-text{font-size:1rem;font-weight:700;padding-bottom:.3125rem;text-align:left;display:inline-block}.psdk-utility .header-icon{display:inline-block}.psdk-utility{width:100%;padding:.625rem 0rem;text-align:left;background-color:var(--app-form-color);border-radius:.6125rem;margin:.3125rem 0rem}.psdk-utility .header{text-align:left;display:flex;align-items:center}.psdk-utility-svg-icon{width:1.4rem;display:inline-block}.psdk-settings-svg-icon{width:1.4rem;display:inline-block;filter:var(--app-primary-color-filter)}.psdk-utility .message{text-align:center}.psdk-utility-card{display:flex;flex-direction:row;padding:.25rem 0rem .25rem .25rem}.psdk-utility-card-icon{flex-grow:1;max-width:2.813rem}.psdk-utility-card-svg-icon{width:2.5rem;display:inline-block}.psdk-utility-card-main{flex-grow:2;max-width:16.563rem}.psdk-utility-card-main-primary-url{color:var(--app-primary-color)}.psdk-utility-card-main-primary-url .mat-mdc-button.mat-primary{padding-left:0}.psdk-utility-card-main-primary-label{font-weight:700}.psdk-utility-card-actions{flex-grow:1;text-align:right}.psdk-utility-card-action-svg-icon{width:1.4rem;display:inline-block}.psdk-utility-card-actions-svg-icon{width:1.4rem;display:inline-block;vertical-align:middle;filter:var(--app-primary-color-filter)}.psdk-utility-card-action-actions-svg-icon{width:1.4rem;display:inline-block;vertical-align:bottom}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MaterialSummaryItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-material-summary-item', standalone: true, imports: [CommonModule, MatButtonModule, MatMenuModule], template: "<div class=\"psdk-utility-card\">\n  <div class=\"psdk-utility-card-icon\">\n    <img class=\"psdk-utility-card-svg-icon\" src=\"{{ imagePath$ }}{{ item$.visual.icon }}.svg\" />\n  </div>\n  <div class=\"psdk-utility-card-main\">\n    <div *ngIf=\"item$.primary.type == 'URL'\" class=\"psdk-utility-card-main-primary-url\">\n      <button mat-button color=\"primary\" (click)=\"item$.primary.click()\">\n        {{ item$.primary.name }}&nbsp;\n        <img class=\"psdk-utility-card-actions-svg-icon\" src=\"{{ imagePath$ }}{{ item$.primary.icon }}.svg\" />\n      </button>\n    </div>\n    <div *ngIf=\"item$.primary.type != 'URL'\" class=\"psdk-utility-card-main-primary-label\">\n      {{ item$.primary.name }}\n    </div>\n    <div *ngIf=\"item$.secondary.text != ''\" [style.color]=\"item$.secondary.error ? 'red' : undefined\">{{ item$.secondary.text }}</div>\n  </div>\n  <div class=\"psdk-utility-card-actions\">\n    <div *ngIf=\"menuIconOverride$ == ''; else showCustom\">\n      <button id=\"setting-button\" mat-icon-button [matMenuTriggerFor]=\"actionMenu\">\n        <img class=\"psdk-utility-card-action-svg-icon\" src=\"{{ settingsSvgIcon$ }}\" />\n      </button>\n      <mat-menu #actionMenu=\"matMenu\" overlapTrigger=\"false\">\n        <ng-container *ngFor=\"let action of item$.actions\">\n          <button mat-menu-item (click)=\"action.onClick()\">\n            <img class=\"psdk-utility-card-action-actions-svg-icon\" src=\"{{ imagePath$ }}{{ action.icon }}.svg\" />&nbsp;\n            {{ action.text }}\n          </button>\n        </ng-container>\n      </mat-menu>\n    </div>\n    <ng-template #showCustom>\n      <button id=\"delete-attachment\" mat-icon-button (click)=\"menuIconOverrideAction$.onClick(item$)\">\n        <img class=\"psdk-utility-card-action-svg-icon\" src=\"{{ menuIconOverride$ }}\" />\n      </button>\n    </ng-template>\n  </div>\n</div>\n", styles: [".psdk-icon{padding:0rem .125rem;min-width:unset}.psdk-utility-divider{border-bottom:.0625rem solid var(--app-neutral-light-color)}.psdk-utility-view-all{width:100%;display:flex;justify-content:center}.psdk-utility-count{background:var(--app-primary-light-color);border-radius:.5625rem;color:var(--app-inverse-form-color);display:inline-block;font-size:.75rem;font-weight:700;text-align:center;width:1.125rem;vertical-align:top;margin:0 0 .313rem 1rem}.psdk-utility .header-text{font-size:1rem;font-weight:700;padding-bottom:.3125rem;text-align:left;display:inline-block}.psdk-utility .header-icon{display:inline-block}.psdk-utility{width:100%;padding:.625rem 0rem;text-align:left;background-color:var(--app-form-color);border-radius:.6125rem;margin:.3125rem 0rem}.psdk-utility .header{text-align:left;display:flex;align-items:center}.psdk-utility-svg-icon{width:1.4rem;display:inline-block}.psdk-settings-svg-icon{width:1.4rem;display:inline-block;filter:var(--app-primary-color-filter)}.psdk-utility .message{text-align:center}.psdk-utility-card{display:flex;flex-direction:row;padding:.25rem 0rem .25rem .25rem}.psdk-utility-card-icon{flex-grow:1;max-width:2.813rem}.psdk-utility-card-svg-icon{width:2.5rem;display:inline-block}.psdk-utility-card-main{flex-grow:2;max-width:16.563rem}.psdk-utility-card-main-primary-url{color:var(--app-primary-color)}.psdk-utility-card-main-primary-url .mat-mdc-button.mat-primary{padding-left:0}.psdk-utility-card-main-primary-label{font-weight:700}.psdk-utility-card-actions{flex-grow:1;text-align:right}.psdk-utility-card-action-svg-icon{width:1.4rem;display:inline-block}.psdk-utility-card-actions-svg-icon{width:1.4rem;display:inline-block;vertical-align:middle;filter:var(--app-primary-color-filter)}.psdk-utility-card-action-actions-svg-icon{width:1.4rem;display:inline-block;vertical-align:bottom}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.Utils }]; }, propDecorators: { item$: [{
                type: Input
            }], menuIconOverride$: [{
                type: Input
            }], menuIconOverrideAction$: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 