import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { NgOptimizedImage } from '@angular/common';
import { InlineCopyComponent } from '@ironsource/fusion-ui/components/inline-copy';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import { TooltipDirective } from '@ironsource/fusion-ui/components/tooltip/v4';
import * as i0 from "@angular/core";
import * as i1 from "@ironsource/fusion-ui/components/icon/v1";
function AppHeaderComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelement(1, "fusion-icon", 6);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", ctx_r0.abTestIcon);
} }
export class AppHeaderComponent {
    constructor() {
        this.size = 'medium';
    }
    get appImageSize() {
        return this.size === 'small' ? 32 : 48;
    }
    get platformIcon() {
        return `v4/branded/${this.platform}`;
    }
    get abTestIcon() {
        return !!this.abTest ? `v4/ab-test/${this.abTest}` : null;
    }
    get appKeyToCopy() {
        return this.size === 'small' ? null : this.appKey;
    }
    get valueToCopy() {
        return this.appKey;
    }
    static { this.ɵfac = function AppHeaderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AppHeaderComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AppHeaderComponent, selectors: [["fusion-app-header"]], hostAttrs: [1, "fusion-v4"], inputs: { size: "size", appName: "appName", appImageSrc: "appImageSrc", platform: "platform", appKey: "appKey", abTest: "abTest" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 8, vars: 12, consts: [[1, "fu-app-header-image", 3, "ngSrc", "width", "height"], [1, "fu-app-header-platform", 3, "name"], [1, "fu-app-header-content"], [1, "fu-app-header-name", "truncate", 3, "fusionTooltip"], ["tooltipText", "Copy app key", 3, "text", "valueToCopy"], [1, "fu-app-header-ab"], [1, "fu-app-header-ab-icon", "fu-colored", 3, "name"]], template: function AppHeaderComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div");
            i0.ɵɵelement(1, "img", 0)(2, "fusion-icon", 1);
            i0.ɵɵelementStart(3, "div", 2)(4, "div", 3);
            i0.ɵɵtext(5);
            i0.ɵɵelementEnd();
            i0.ɵɵelement(6, "fusion-inline-copy", 4);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(7, AppHeaderComponent_Conditional_7_Template, 2, 1, "div", 5);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵclassMapInterpolate1("fu-app-header-wrapper fu-size-", ctx.size, "");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngSrc", ctx.appImageSrc)("width", ctx.appImageSize)("height", ctx.appImageSize);
            i0.ɵɵadvance();
            i0.ɵɵproperty("name", ctx.platformIcon);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("fusionTooltip", ctx.appName);
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate(ctx.appName);
            i0.ɵɵadvance();
            i0.ɵɵproperty("text", ctx.appKeyToCopy)("valueToCopy", ctx.valueToCopy);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.abTest ? 7 : -1);
        } }, dependencies: [InlineCopyComponent, IconModule, i1.IconComponent, NgOptimizedImage, TooltipDirective], styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\";.font-v4-bold[_ngcontent-%COMP%], .font-v4-tab-label-2[_ngcontent-%COMP%], .font-v4-chart-2[_ngcontent-%COMP%], .font-v4-chart-1[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:700;-webkit-font-smoothing:antialiased}.font-v4-semibold[_ngcontent-%COMP%], .font-v4-chip-label[_ngcontent-%COMP%], .font-v4-table-label[_ngcontent-%COMP%], .font-v4-button[_ngcontent-%COMP%], .font-v4-heading-6[_ngcontent-%COMP%], .font-v4-heading-5[_ngcontent-%COMP%], .font-v4-heading-4[_ngcontent-%COMP%], .font-v4-heading-3[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]   .fu-app-header-name[_ngcontent-%COMP%], .font-v4-heading-2[_ngcontent-%COMP%], .font-v4-heading-1[_ngcontent-%COMP%], .font-v4-title[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:600;-webkit-font-smoothing:antialiased}.font-v4-medium[_ngcontent-%COMP%], .font-v4-tab-label-1[_ngcontent-%COMP%], .font-v4-input-label[_ngcontent-%COMP%], .font-v4-overline[_ngcontent-%COMP%], .font-v4-subtitle-2[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-app-header-wrapper.fu-size-small[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]   .fu-app-header-name[_ngcontent-%COMP%], .font-v4-subtitle-1[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:500;-webkit-font-smoothing:antialiased}.font-v4-regular[_ngcontent-%COMP%], .font-v4-caption[_ngcontent-%COMP%], .font-v4-body-2[_ngcontent-%COMP%], .font-v4-body-1[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased}.font-v4-title[_ngcontent-%COMP%]{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-v4-heading-1[_ngcontent-%COMP%]{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]   .fu-app-header-name[_ngcontent-%COMP%], .font-v4-heading-2[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-v4-heading-3[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-v4-heading-4[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-v4-heading-5[_ngcontent-%COMP%]{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-v4-heading-6[_ngcontent-%COMP%]{font-size:.75rem;line-height:.75rem;letter-spacing:0}.font-v4-body-1[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-body-2[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}[_nghost-%COMP%]   .fu-app-header-wrapper.fu-size-small[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]   .fu-app-header-name[_ngcontent-%COMP%], .font-v4-subtitle-1[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-subtitle-2[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-v4-chart-1[_ngcontent-%COMP%]{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-v4-chart-2[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-v4-button[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-v4-overline[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-v4-caption[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem}.font-v4-table-label[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-v4-input-label[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-v4-tab-label-1[_ngcontent-%COMP%], .font-v4-tab-label-2[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem}.font-v4-chip-label[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem;letter-spacing:normal}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]   .fu-app-header-name.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}[_nghost-%COMP%]{--fu-app-header-height: 48px;--fu-app-header-gap: 8px;--fu-app-header-app-image-border-radius: 6px;--fu-app-header-app-name-color: var(--text-primary, hsl(0, 0%, 12.5%));--fu-app-header-platform-icon-size: 24px;--fu-app-header-platform-icon-color: var(--action-active, hsl(0, 0%, 50.3%));--fu-app-header-appkey-color: var(--text-secondary, hsl(0, 0%, 39.3%));--fu-app-header-ab-icon-size: 28px;--fu-app-header-ab-border: solid 1px var(--common-divider, hsl(0, 0%, 86.8%));--fu-app-header-ab-gap: 4px}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--fu-app-header-gap);height:var(--fu-app-header-height)}[_nghost-%COMP%]   .fu-app-header-wrapper.fu-size-small[_ngcontent-%COMP%]{--fu-app-header-height: 32px;--fu-app-header-gap: 4px;--fu-app-header-platform-icon-size: 20px}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-image[_ngcontent-%COMP%]{border-radius:var(--fu-app-header-app-image-border-radius)}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-platform[_ngcontent-%COMP%]{width:var(--fu-app-header-platform-icon-size);height:var(--fu-app-header-platform-icon-size);color:var(--fu-app-header-platform-icon-color)}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]   .fu-app-header-name[_ngcontent-%COMP%]{color:var(--fu-app-header-app-name-color)}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-ab[_ngcontent-%COMP%]{height:100%;border-left:var(--fu-app-header-ab-border);margin-left:var(--fu-app-header-ab-gap);padding-left:calc(var(--fu-app-header-ab-gap) * 2);display:flex;align-items:center}[_nghost-%COMP%]   .fu-app-header-wrapper[_ngcontent-%COMP%]   .fu-app-header-ab[_ngcontent-%COMP%]   .fu-app-header-ab-icon[_ngcontent-%COMP%]{width:var(--fu-app-header-ab-icon-size);height:var(--fu-app-header-ab-icon-size)}[_nghost-%COMP%]   .fu-app-header-wrapper.fu-size-small[_ngcontent-%COMP%]   .fu-app-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--fu-app-header-gap)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppHeaderComponent, [{
        type: Component,
        args: [{ selector: 'fusion-app-header', standalone: true, host: { class: 'fusion-v4' }, imports: [InlineCopyComponent, IconModule, NgOptimizedImage, TooltipDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"fu-app-header-wrapper fu-size-{{size}}\">\n    <img [ngSrc]=\"appImageSrc\" [width]=\"appImageSize\" [height]=\"appImageSize\"  class=\"fu-app-header-image\"/>\n    <fusion-icon class=\"fu-app-header-platform\" [name]=\"platformIcon\"></fusion-icon>\n    <div class=\"fu-app-header-content\">\n        <div class=\"fu-app-header-name truncate\" [fusionTooltip]=\"appName\">{{appName}}</div>\n        <fusion-inline-copy [text]=\"appKeyToCopy\" [valueToCopy]=\"valueToCopy\" tooltipText=\"Copy app key\" />\n    </div>\n    @if(abTest){\n        <div class=\"fu-app-header-ab\">\n            <fusion-icon class=\"fu-app-header-ab-icon fu-colored\" [name]=\"abTestIcon\"></fusion-icon>\n        </div>\n    }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\";.font-v4-bold,.font-v4-tab-label-2,.font-v4-chart-2,.font-v4-chart-1{font-family:Inter,sans-serif;font-weight:700;-webkit-font-smoothing:antialiased}.font-v4-semibold,.font-v4-chip-label,.font-v4-table-label,.font-v4-button,.font-v4-heading-6,.font-v4-heading-5,.font-v4-heading-4,.font-v4-heading-3,:host .fu-app-header-wrapper .fu-app-header-content .fu-app-header-name,.font-v4-heading-2,.font-v4-heading-1,.font-v4-title{font-family:Inter,sans-serif;font-weight:600;-webkit-font-smoothing:antialiased}.font-v4-medium,.font-v4-tab-label-1,.font-v4-input-label,.font-v4-overline,.font-v4-subtitle-2,:host .fu-app-header-wrapper.fu-size-small .fu-app-header-content .fu-app-header-name,.font-v4-subtitle-1{font-family:Inter,sans-serif;font-weight:500;-webkit-font-smoothing:antialiased}.font-v4-regular,.font-v4-caption,.font-v4-body-2,.font-v4-body-1{font-family:Inter,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased}.font-v4-title{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-v4-heading-1{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}:host .fu-app-header-wrapper .fu-app-header-content .fu-app-header-name,.font-v4-heading-2{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-v4-heading-3{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-v4-heading-4{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-v4-heading-5{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-v4-heading-6{font-size:.75rem;line-height:.75rem;letter-spacing:0}.font-v4-body-1{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-body-2{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}:host .fu-app-header-wrapper.fu-size-small .fu-app-header-content .fu-app-header-name,.font-v4-subtitle-1{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-subtitle-2{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-v4-chart-1{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-v4-chart-2{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-v4-button{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-v4-overline{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-v4-caption{font-size:.75rem;line-height:1rem}.font-v4-table-label{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-v4-input-label{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-v4-tab-label-1,.font-v4-tab-label-2{font-size:.875rem;line-height:1rem}.font-v4-chip-label{font-size:.75rem;line-height:1rem;letter-spacing:normal}:host *{box-sizing:border-box}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host .fu-app-header-wrapper .fu-app-header-content .fu-app-header-name.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}:host{--fu-app-header-height: 48px;--fu-app-header-gap: 8px;--fu-app-header-app-image-border-radius: 6px;--fu-app-header-app-name-color: var(--text-primary, hsl(0, 0%, 12.5%));--fu-app-header-platform-icon-size: 24px;--fu-app-header-platform-icon-color: var(--action-active, hsl(0, 0%, 50.3%));--fu-app-header-appkey-color: var(--text-secondary, hsl(0, 0%, 39.3%));--fu-app-header-ab-icon-size: 28px;--fu-app-header-ab-border: solid 1px var(--common-divider, hsl(0, 0%, 86.8%));--fu-app-header-ab-gap: 4px}:host .fu-app-header-wrapper{display:flex;align-items:center;gap:var(--fu-app-header-gap);height:var(--fu-app-header-height)}:host .fu-app-header-wrapper.fu-size-small{--fu-app-header-height: 32px;--fu-app-header-gap: 4px;--fu-app-header-platform-icon-size: 20px}:host .fu-app-header-wrapper .fu-app-header-image{border-radius:var(--fu-app-header-app-image-border-radius)}:host .fu-app-header-wrapper .fu-app-header-platform{width:var(--fu-app-header-platform-icon-size);height:var(--fu-app-header-platform-icon-size);color:var(--fu-app-header-platform-icon-color)}:host .fu-app-header-wrapper .fu-app-header-content .fu-app-header-name{color:var(--fu-app-header-app-name-color)}:host .fu-app-header-wrapper .fu-app-header-ab{height:100%;border-left:var(--fu-app-header-ab-border);margin-left:var(--fu-app-header-ab-gap);padding-left:calc(var(--fu-app-header-ab-gap) * 2);display:flex;align-items:center}:host .fu-app-header-wrapper .fu-app-header-ab .fu-app-header-ab-icon{width:var(--fu-app-header-ab-icon-size);height:var(--fu-app-header-ab-icon-size)}:host .fu-app-header-wrapper.fu-size-small .fu-app-header-content{display:flex;align-items:center;gap:var(--fu-app-header-gap)}\n"] }]
    }], null, { size: [{
            type: Input
        }], appName: [{
            type: Input
        }], appImageSrc: [{
            type: Input
        }], platform: [{
            type: Input
        }], appKey: [{
            type: Input
        }], abTest: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AppHeaderComponent, { className: "AppHeaderComponent", filePath: "app-header.component.ts", lineNumber: 17 }); })();
//# sourceMappingURL=data:application/json;base64, 