import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, EventEmitter, inject, Input, Output } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { RouterModule } from '@angular/router';
import { DensityDirective } from '@metad/ocap-angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { NgmCopilotService } from '../services';
import * as i0 from "@angular/core";
import * as i1 from "@ngx-translate/core";
import * as i2 from "@angular/material/icon";
import * as i3 from "@angular/material/button";
export class NgmCopilotEnableComponent {
    constructor() {
        this.copilotService = inject(NgmCopilotService);
        this.toConfig = new EventEmitter();
    }
    get copilotConfig() {
        return this.copilotService.copilot;
    }
    navigateToConfig() {
        this.toConfig.emit();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: NgmCopilotEnableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: NgmCopilotEnableComponent, isStandalone: true, selector: "ngm-copilot-enable", inputs: { title: "title", subTitle: "subTitle" }, outputs: { toConfig: "toConfig" }, host: { classAttribute: "ngm-copilot-enable" }, ngImport: i0, template: "@if (!copilotConfig?.enabled || !copilotConfig?.apiKey) {\n<div class=\"w-full h-full flex-1 flex flex-col justify-center items-center gap-4 bg-gray-500/20 backdrop-blur-md group\">\n    <div class=\"text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-rose-400 via-fuchsia-500 to-indigo-500 group-hover:ngm-background-animate\">\n        {{ title }}\n    </div>\n    <div class=\"text-base font-bold text-transparent bg-clip-text bg-gradient-to-r from-rose-400 via-fuchsia-500 to-indigo-500 group-hover:ngm-background-animate\">\n        {{ subTitle }}\n    </div>\n    \n    @if (copilotConfig?.enabled && !copilotConfig?.apiKey) {\n    <div class=\"text-red-400\">\n        {{ 'Ngm.Copilot.ProvideOpenaiApiKey' | translate: {Default: 'Please provide openai api key!'} }}\n    </div>\n    }\n    \n    <button mat-stroked-button (click)=\"navigateToConfig()\">\n        <div class=\"flex items-center\">\n            {{ 'Ngm.Copilot.EnableCopilot' | translate: {Default: 'Enable Copilot'} }}\n            <mat-icon fontSet=\"material-icons-outlined\" displayDensity=\"cosy\">arrow_forward</mat-icon>\n        </div>\n    </button>\n</div>\n}\n", styles: [":host{position:absolute;top:0;left:0;display:flex;height:100%;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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]  ", exportAs: ["matButton"] }, { kind: "directive", type: DensityDirective, selector: "[displayDensity]", inputs: ["displayDensity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: NgmCopilotEnableComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ngm-copilot-enable', imports: [CommonModule, RouterModule, TranslateModule, MatIconModule, MatButtonModule, DensityDirective], host: {
                        class: 'ngm-copilot-enable'
                    }, template: "@if (!copilotConfig?.enabled || !copilotConfig?.apiKey) {\n<div class=\"w-full h-full flex-1 flex flex-col justify-center items-center gap-4 bg-gray-500/20 backdrop-blur-md group\">\n    <div class=\"text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-rose-400 via-fuchsia-500 to-indigo-500 group-hover:ngm-background-animate\">\n        {{ title }}\n    </div>\n    <div class=\"text-base font-bold text-transparent bg-clip-text bg-gradient-to-r from-rose-400 via-fuchsia-500 to-indigo-500 group-hover:ngm-background-animate\">\n        {{ subTitle }}\n    </div>\n    \n    @if (copilotConfig?.enabled && !copilotConfig?.apiKey) {\n    <div class=\"text-red-400\">\n        {{ 'Ngm.Copilot.ProvideOpenaiApiKey' | translate: {Default: 'Please provide openai api key!'} }}\n    </div>\n    }\n    \n    <button mat-stroked-button (click)=\"navigateToConfig()\">\n        <div class=\"flex items-center\">\n            {{ 'Ngm.Copilot.EnableCopilot' | translate: {Default: 'Enable Copilot'} }}\n            <mat-icon fontSet=\"material-icons-outlined\" displayDensity=\"cosy\">arrow_forward</mat-icon>\n        </div>\n    </button>\n</div>\n}\n", styles: [":host{position:absolute;top:0;left:0;display:flex;height:100%;width:100%}\n"] }]
        }], propDecorators: { title: [{
                type: Input
            }], subTitle: [{
                type: Input
            }], toConfig: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 