import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
import { RunView } from '@memberjunction/core';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
const _forTrack0 = ($index, $item) => $item.value;
const _forTrack1 = ($index, $item) => $item.Name;
function ActionPinConfigDialogComponent_Conditional_0_For_30_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 29);
} }
function ActionPinConfigDialogComponent_Conditional_0_For_30_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 28);
    i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_For_30_Template_button_click_0_listener() { const c_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectColor(c_r4.value)); });
    i0.ɵɵconditionalCreate(1, ActionPinConfigDialogComponent_Conditional_0_For_30_Conditional_1_Template, 1, 0, "i", 29);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const c_r4 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("background", c_r4.value);
    i0.ɵɵclassProp("selected", ctx_r1.AccentColor === c_r4.value);
    i0.ɵɵattribute("aria-label", c_r4.name);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.AccentColor === c_r4.value ? 1 : -1);
} }
function ActionPinConfigDialogComponent_Conditional_0_For_36_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 30);
    i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_For_36_Template_button_click_0_listener() { const icon_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectFaIcon(icon_r6)); });
    i0.ɵɵelement(1, "i");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const icon_r6 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("selected", ctx_r1.FaIcon === icon_r6);
    i0.ɵɵadvance();
    i0.ɵɵclassMap(icon_r6);
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_40_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵelement(1, "i", 31);
    i0.ɵɵtext(2, " Loading parameters\u2026 ");
    i0.ɵɵelementEnd();
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_41_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23);
    i0.ɵɵtext(1, "This action takes no input parameters.");
    i0.ɵɵelementEnd();
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 37);
    i0.ɵɵtext(1, "required");
    i0.ɵɵelementEnd();
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 38);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const p_r8 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(p_r8.Description);
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_16_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 45);
    i0.ɵɵtwoWayListener("ngModelChange", function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_16_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9); const p_r8 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(p_r8.PresetValue, $event) || (p_r8.PresetValue = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const p_r8 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵtwoWayProperty("ngModel", p_r8.PresetValue);
    i0.ɵɵproperty("placeholder", p_r8.DefaultValue || "Preset value");
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 44);
    i0.ɵɵelement(1, "i", 46);
    i0.ɵɵtext(2, " Asked at click time ");
    i0.ɵɵelementEnd();
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 36);
    i0.ɵɵtext(3);
    i0.ɵɵconditionalCreate(4, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_4_Template, 2, 0, "span", 37);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(5, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_5_Template, 2, 1, "div", 38);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 39)(7, "label", 40)(8, "input", 41);
    i0.ɵɵlistener("change", function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template_input_change_8_listener() { const p_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SetParamMode(p_r8, "preset")); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "span");
    i0.ɵɵtext(10, "Preset");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(11, "label", 40)(12, "input", 41);
    i0.ɵɵlistener("change", function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template_input_change_12_listener() { const p_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SetParamMode(p_r8, "runtime")); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "span");
    i0.ɵɵtext(14, "Prompt");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(15, "div", 42);
    i0.ɵɵconditionalCreate(16, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_16_Template, 1, 2, "input", 43)(17, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Conditional_17_Template, 3, 0, "span", 44);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const p_r8 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", p_r8.Name, " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(p_r8.IsRequired ? 4 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(p_r8.Description ? 5 : -1);
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("selected", p_r8.Mode === "preset");
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", "mode-" + p_r8.Name)("checked", p_r8.Mode === "preset");
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("selected", p_r8.Mode === "runtime");
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", "mode-" + p_r8.Name)("checked", p_r8.Mode === "runtime");
    i0.ɵɵadvance(4);
    i0.ɵɵconditional(p_r8.Mode === "preset" ? 16 : 17);
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_42_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵtext(1, " Choose which parameters are ");
    i0.ɵɵelementStart(2, "strong");
    i0.ɵɵtext(3, "preset");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(4, " (baked into the pin) vs. ");
    i0.ɵɵelementStart(5, "strong");
    i0.ɵɵtext(6, "prompted at runtime");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(7, " each time the pin is clicked. ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 33);
    i0.ɵɵrepeaterCreate(9, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_For_10_Template, 18, 12, "div", 34, _forTrack1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(9);
    i0.ɵɵrepeater(ctx_r1.Params);
} }
function ActionPinConfigDialogComponent_Conditional_0_Conditional_43_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 24);
    i0.ɵɵelement(1, "i", 47);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r1.ErrorMessage, " ");
} }
function ActionPinConfigDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 0);
    i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h3", 3);
    i0.ɵɵelement(4, "i", 4);
    i0.ɵɵtext(5, " Pin Action ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "button", 5);
    i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
    i0.ɵɵelement(7, "i", 6);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(8, "div", 7)(9, "div", 8);
    i0.ɵɵelement(10, "i", 9);
    i0.ɵɵelementStart(11, "span");
    i0.ɵɵtext(12);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(13, "div", 10)(14, "div", 11)(15, "div", 12);
    i0.ɵɵelement(16, "i");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "div", 13);
    i0.ɵɵtext(18);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(19, "div", 14);
    i0.ɵɵtext(20, "Live preview of how your pin will look on Home");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(21, "div", 15)(22, "label", 16);
    i0.ɵɵtext(23, "Pin title");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(24, "input", 17);
    i0.ɵɵtwoWayListener("ngModelChange", function ActionPinConfigDialogComponent_Conditional_0_Template_input_ngModelChange_24_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.DisplayName, $event) || (ctx_r1.DisplayName = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(25, "div", 15)(26, "label");
    i0.ɵɵtext(27, "Accent color");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(28, "div", 18);
    i0.ɵɵrepeaterCreate(29, ActionPinConfigDialogComponent_Conditional_0_For_30_Template, 2, 6, "button", 19, _forTrack0);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(31, "div", 15)(32, "label");
    i0.ɵɵtext(33, "Icon");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(34, "div", 20);
    i0.ɵɵrepeaterCreate(35, ActionPinConfigDialogComponent_Conditional_0_For_36_Template, 2, 4, "button", 21, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(37, "div", 15)(38, "label");
    i0.ɵɵtext(39, "Parameters");
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(40, ActionPinConfigDialogComponent_Conditional_0_Conditional_40_Template, 3, 0, "div", 22)(41, ActionPinConfigDialogComponent_Conditional_0_Conditional_41_Template, 2, 0, "div", 23)(42, ActionPinConfigDialogComponent_Conditional_0_Conditional_42_Template, 11, 0);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(43, ActionPinConfigDialogComponent_Conditional_0_Conditional_43_Template, 3, 1, "div", 24);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(44, "div", 25)(45, "button", 26);
    i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_button_click_45_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Save()); });
    i0.ɵɵelement(46, "i", 4);
    i0.ɵɵtext(47, " Pin to Home ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(48, "button", 27);
    i0.ɵɵlistener("click", function ActionPinConfigDialogComponent_Conditional_0_Template_button_click_48_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
    i0.ɵɵtext(49, " Cancel ");
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(12);
    i0.ɵɵtextInterpolate(ctx_r1.ActionName);
    i0.ɵɵadvance(2);
    i0.ɵɵstyleProp("background", "linear-gradient(135deg, " + ctx_r1.AccentColor + " 0%, " + ctx_r1.AccentColor + "cc 100%)");
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(ctx_r1.FaIcon);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r1.DisplayName || "Untitled pin");
    i0.ɵɵadvance(6);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.DisplayName);
    i0.ɵɵadvance(5);
    i0.ɵɵrepeater(ctx_r1.ColorPalette);
    i0.ɵɵadvance(6);
    i0.ɵɵrepeater(ctx_r1.FaIconPalette);
    i0.ɵɵadvance(5);
    i0.ɵɵconditional(ctx_r1.IsLoadingParams ? 40 : ctx_r1.Params.length === 0 ? 41 : 42);
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(ctx_r1.ErrorMessage ? 43 : -1);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("disabled", !ctx_r1.CanSave());
} }
const COLOR_PALETTE = [
    { name: 'Indigo', value: '#4F46E5' },
    { name: 'Emerald', value: '#10B981' },
    { name: 'Rose', value: '#F43F5E' },
    { name: 'Amber', value: '#F59E0B' },
    { name: 'Sky', value: '#0EA5E9' },
    { name: 'Violet', value: '#8B5CF6' },
    { name: 'Teal', value: '#14B8A6' },
    { name: 'Slate', value: '#475569' }
];
const FA_ICON_PALETTE = [
    'fa-solid fa-bolt', 'fa-solid fa-rocket', 'fa-solid fa-wand-magic-sparkles',
    'fa-solid fa-robot', 'fa-solid fa-gears', 'fa-solid fa-play',
    'fa-solid fa-bullhorn', 'fa-solid fa-envelope', 'fa-solid fa-chart-line',
    'fa-solid fa-file-export', 'fa-solid fa-file-import', 'fa-solid fa-database',
    'fa-solid fa-code', 'fa-solid fa-terminal', 'fa-solid fa-paper-plane',
    'fa-solid fa-camera', 'fa-solid fa-image', 'fa-solid fa-bell',
    'fa-solid fa-flag', 'fa-solid fa-star', 'fa-solid fa-heart',
    'fa-solid fa-bookmark', 'fa-solid fa-tag', 'fa-solid fa-lightbulb',
    'fa-solid fa-brain', 'fa-solid fa-microchip', 'fa-solid fa-server',
    'fa-solid fa-cloud', 'fa-solid fa-cube', 'fa-solid fa-thumbtack'
];
export class ActionPinConfigDialogComponent extends BaseAngularComponent {
    cdr;
    Visible = false;
    ActionID = null;
    ActionName = null;
    ActionDescription = null;
    Result = new EventEmitter();
    ColorPalette = COLOR_PALETTE;
    FaIconPalette = FA_ICON_PALETTE;
    DisplayName = '';
    AccentColor = COLOR_PALETTE[0].value;
    FaIcon = FA_ICON_PALETTE[0];
    Params = [];
    IsLoadingParams = false;
    ErrorMessage = null;
    constructor(cdr) {
        super();
        this.cdr = cdr;
    }
    ngOnChanges(changes) {
        if (changes['Visible'] && this.Visible && this.ActionID) {
            this.resetState();
            this.loadParams();
        }
    }
    resetState() {
        this.DisplayName = this.ActionName ?? '';
        this.AccentColor = COLOR_PALETTE[0].value;
        this.FaIcon = FA_ICON_PALETTE[0];
        this.Params = [];
        this.ErrorMessage = null;
        this.IsLoadingParams = false;
    }
    async loadParams() {
        if (!this.ActionID)
            return;
        this.IsLoadingParams = true;
        this.cdr.markForCheck();
        try {
            const rv = RunView.FromMetadataProvider(this.ProviderToUse);
            const result = await rv.RunView({
                EntityName: 'MJ: Action Params',
                ExtraFilter: `ActionID='${this.ActionID}' AND (Type='Input' OR Type='Both')`,
                OrderBy: 'Name',
                ResultType: 'entity_object'
            });
            if (!result.Success) {
                this.ErrorMessage = `Could not load parameters: ${result.ErrorMessage}`;
                return;
            }
            this.Params = (result.Results ?? []).map(p => ({
                Name: p.Name,
                Description: p.Description ?? '',
                IsRequired: p.IsRequired,
                DefaultValue: p.DefaultValue ?? '',
                Mode: p.IsRequired ? 'preset' : 'runtime',
                PresetValue: p.DefaultValue ?? ''
            }));
        }
        catch (err) {
            this.ErrorMessage = `Failed to load action parameters: ${err.message}`;
        }
        finally {
            this.IsLoadingParams = false;
            this.cdr.markForCheck();
        }
    }
    SelectColor(hex) {
        this.AccentColor = hex;
        this.cdr.markForCheck();
    }
    SelectFaIcon(icon) {
        this.FaIcon = icon;
        this.cdr.markForCheck();
    }
    SetParamMode(param, mode) {
        param.Mode = mode;
        this.cdr.markForCheck();
    }
    CanSave() {
        if (!this.DisplayName.trim())
            return false;
        for (const p of this.Params) {
            if (p.Mode === 'preset' && p.IsRequired && !p.PresetValue.trim())
                return false;
        }
        return true;
    }
    Save() {
        if (!this.CanSave() || !this.ActionID || !this.ActionName)
            return;
        const presetParams = {};
        const runtimeParamNames = [];
        for (const p of this.Params) {
            if (p.Mode === 'preset') {
                if (p.PresetValue.trim() !== '')
                    presetParams[p.Name] = p.PresetValue;
            }
            else {
                runtimeParamNames.push(p.Name);
            }
        }
        this.Result.emit({
            Action: 'save',
            Pin: {
                DisplayName: this.DisplayName.trim(),
                ActionID: this.ActionID,
                ActionName: this.ActionName,
                AccentColor: this.AccentColor,
                FaIcon: this.FaIcon,
                PresetParams: presetParams,
                RuntimeParamNames: runtimeParamNames
            }
        });
    }
    Cancel() {
        this.Result.emit({ Action: 'cancel' });
    }
    static ɵfac = function ActionPinConfigDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionPinConfigDialogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionPinConfigDialogComponent, selectors: [["mj-action-pin-config-dialog"]], inputs: { Visible: "Visible", ActionID: "ActionID", ActionName: "ActionName", ActionDescription: "ActionDescription" }, outputs: { Result: "Result" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[1, "apc-backdrop", 3, "click"], ["role", "dialog", "aria-modal", "true", "aria-labelledby", "apc-title", 1, "apc-dialog"], [1, "apc-header"], ["id", "apc-title"], [1, "fa-solid", "fa-thumbtack"], ["aria-label", "Close", 1, "apc-close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "apc-body"], [1, "apc-action-chip"], [1, "fa-solid", "fa-bolt"], [1, "apc-preview"], [1, "apc-preview-card"], [1, "apc-preview-icon"], [1, "apc-preview-title"], [1, "apc-preview-hint"], [1, "apc-field"], ["for", "apc-name"], ["id", "apc-name", "type", "text", "placeholder", "e.g. Run Weekly Sales Report", 1, "mj-input", 3, "ngModelChange", "ngModel"], [1, "apc-color-grid"], ["type", "button", 1, "apc-color-swatch", 3, "selected", "background"], [1, "apc-icon-grid"], ["type", "button", 1, "apc-icon-swatch", 3, "selected"], [1, "apc-params-loading"], [1, "apc-params-empty"], [1, "apc-error"], [1, "apc-footer"], ["type", "button", 1, "apc-btn", "primary", 3, "click", "disabled"], ["type", "button", 1, "apc-btn", 3, "click"], ["type", "button", 1, "apc-color-swatch", 3, "click"], [1, "fa-solid", "fa-check"], ["type", "button", 1, "apc-icon-swatch", 3, "click"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "apc-params-help"], [1, "apc-params-table"], [1, "apc-param-row"], [1, "apc-param-info"], [1, "apc-param-name"], [1, "apc-param-req"], [1, "apc-param-desc"], [1, "apc-param-mode"], [1, "apc-mode-option"], ["type", "radio", 3, "change", "name", "checked"], [1, "apc-param-value"], ["type", "text", 1, "mj-input", 3, "ngModel", "placeholder"], [1, "apc-runtime-hint"], ["type", "text", 1, "mj-input", 3, "ngModelChange", "ngModel", "placeholder"], [1, "fa-solid", "fa-keyboard"], [1, "fa-solid", "fa-triangle-exclamation"]], template: function ActionPinConfigDialogComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵconditionalCreate(0, ActionPinConfigDialogComponent_Conditional_0_Template, 50, 10);
        } if (rf & 2) {
            i0.ɵɵconditional(ctx.Visible ? 0 : -1);
        } }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".apc-backdrop {\n    position: fixed;\n    inset: 0;\n    background: var(--mj-bg-overlay);\n    z-index: 9000;\n    animation: apc-fade-in 0.15s ease;\n}\n\n.apc-dialog {\n    position: fixed;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n    z-index: 9001;\n    width: min(640px, calc(100vw - 32px));\n    max-height: calc(100vh - 48px);\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);\n    display: flex;\n    flex-direction: column;\n    animation: apc-pop-in 0.18s ease;\n}\n\n@keyframes apc-fade-in {\n    from { opacity: 0; }\n    to { opacity: 1; }\n}\n\n@keyframes apc-pop-in {\n    from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }\n    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n.apc-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 20px;\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.apc-header h3 {\n    margin: 0;\n    font-size: 17px;\n    font-weight: 600;\n    display: flex;\n    align-items: center;\n    gap: 10px;\n    color: var(--mj-text-primary);\n}\n\n.apc-header h3 i {\n    color: var(--mj-brand-primary);\n}\n\n.apc-close {\n    background: transparent;\n    border: none;\n    color: var(--mj-text-muted);\n    font-size: 16px;\n    cursor: pointer;\n    padding: 6px 10px;\n    border-radius: 6px;\n}\n\n.apc-close:hover {\n    background: var(--mj-bg-surface-hover);\n    color: var(--mj-text-primary);\n}\n\n.apc-body {\n    padding: 20px;\n    overflow-y: auto;\n    display: flex;\n    flex-direction: column;\n    gap: 20px;\n}\n\n.apc-action-chip {\n    display: inline-flex;\n    align-items: center;\n    gap: 8px;\n    padding: 6px 12px;\n    background: var(--mj-bg-surface-sunken);\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 999px;\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    align-self: flex-start;\n}\n\n.apc-action-chip i {\n    color: var(--mj-brand-primary);\n}\n\n.apc-preview {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    gap: 8px;\n}\n\n.apc-preview-card {\n    width: 180px;\n    height: 120px;\n    border-radius: 10px;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    gap: 8px;\n    color: var(--mj-text-inverse, white);\n    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n    transition: transform 0.15s ease;\n}\n\n.apc-preview-icon {\n    font-size: 34px;\n    line-height: 1;\n    color: var(--mj-text-inverse, white);\n}\n\n.apc-preview-title {\n    font-size: 13px;\n    font-weight: 600;\n    text-align: center;\n    padding: 0 12px;\n    max-width: 100%;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n}\n\n.apc-preview-hint {\n    font-size: 12px;\n    color: var(--mj-text-muted);\n}\n\n.apc-field {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n}\n\n.apc-field > label {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n\n.apc-color-grid {\n    display: grid;\n    grid-template-columns: repeat(8, 1fr);\n    gap: 8px;\n}\n\n.apc-color-swatch {\n    width: 100%;\n    aspect-ratio: 1;\n    border-radius: 8px;\n    border: 2px solid transparent;\n    cursor: pointer;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    color: var(--mj-text-inverse, white);\n    font-size: 12px;\n    transition: transform 0.1s ease;\n}\n\n.apc-color-swatch:hover {\n    transform: scale(1.08);\n}\n\n.apc-color-swatch.selected {\n    border-color: var(--mj-text-primary);\n    box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-text-primary);\n}\n\n.apc-icon-grid {\n    display: grid;\n    grid-template-columns: repeat(10, 1fr);\n    gap: 6px;\n    max-height: 180px;\n    overflow-y: auto;\n    padding: 4px;\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 8px;\n    background: var(--mj-bg-surface-sunken);\n}\n\n.apc-icon-swatch {\n    aspect-ratio: 1;\n    background: var(--mj-bg-surface);\n    border: 1px solid transparent;\n    border-radius: 6px;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    font-size: 14px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    transition: all 0.1s ease;\n}\n\n.apc-icon-swatch:hover {\n    background: var(--mj-bg-surface-hover);\n    color: var(--mj-text-primary);\n}\n\n.apc-icon-swatch.selected {\n    background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n    color: var(--mj-brand-primary);\n    border-color: var(--mj-brand-primary);\n}\n\n.apc-params-loading,\n.apc-params-empty {\n    padding: 16px;\n    text-align: center;\n    font-size: 13px;\n    color: var(--mj-text-muted);\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 8px;\n}\n\n.apc-params-help {\n    font-size: 12px;\n    color: var(--mj-text-muted);\n    margin-bottom: 4px;\n}\n\n.apc-params-help strong {\n    color: var(--mj-text-secondary);\n}\n\n.apc-params-table {\n    display: flex;\n    flex-direction: column;\n    gap: 6px;\n    max-height: 260px;\n    overflow-y: auto;\n    padding-right: 4px;\n}\n\n.apc-param-row {\n    display: grid;\n    grid-template-columns: 1fr 160px 1fr;\n    gap: 10px;\n    align-items: center;\n    padding: 10px 12px;\n    background: var(--mj-bg-surface-sunken);\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 6px;\n}\n\n.apc-param-name {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    display: flex;\n    align-items: center;\n    gap: 6px;\n}\n\n.apc-param-req {\n    font-size: 10px;\n    font-weight: 500;\n    padding: 1px 6px;\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n    border-radius: 3px;\n    text-transform: uppercase;\n    letter-spacing: 0.4px;\n}\n\n.apc-param-desc {\n    font-size: 11px;\n    color: var(--mj-text-muted);\n    margin-top: 2px;\n    line-height: 1.4;\n}\n\n.apc-param-mode {\n    display: flex;\n    gap: 4px;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 6px;\n    padding: 2px;\n}\n\n.apc-mode-option {\n    flex: 1;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 4px 8px;\n    border-radius: 4px;\n    font-size: 11px;\n    font-weight: 500;\n    color: var(--mj-text-muted);\n    cursor: pointer;\n    transition: all 0.1s ease;\n}\n\n.apc-mode-option input {\n    display: none;\n}\n\n.apc-mode-option.selected {\n    background: var(--mj-brand-primary);\n    color: var(--mj-text-inverse, white);\n}\n\n.apc-runtime-hint {\n    font-size: 11px;\n    color: var(--mj-text-muted);\n    display: inline-flex;\n    align-items: center;\n    gap: 4px;\n    font-style: italic;\n}\n\n.apc-error {\n    padding: 10px 12px;\n    background: var(--mj-status-error-bg);\n    color: var(--mj-status-error-text);\n    border: 1px solid var(--mj-status-error-border);\n    border-radius: 6px;\n    font-size: 13px;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.apc-footer {\n    display: flex;\n    gap: 8px;\n    padding: 14px 20px;\n    border-top: 1px solid var(--mj-border-subtle);\n    background: var(--mj-bg-surface-card);\n    border-bottom-left-radius: 12px;\n    border-bottom-right-radius: 12px;\n}\n\n.apc-btn {\n    padding: 8px 16px;\n    border-radius: 6px;\n    font-size: 13px;\n    font-weight: 500;\n    cursor: pointer;\n    border: 1px solid var(--mj-border-default);\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n}\n\n.apc-btn:hover:not(:disabled) {\n    background: var(--mj-bg-surface-hover);\n}\n\n.apc-btn.primary {\n    background: var(--mj-brand-primary);\n    color: var(--mj-text-inverse, white);\n    border-color: var(--mj-brand-primary);\n}\n\n.apc-btn.primary:hover:not(:disabled) {\n    background: var(--mj-brand-primary-hover);\n}\n\n.apc-btn:disabled {\n    opacity: 0.5;\n    cursor: not-allowed;\n}\n"], encapsulation: 2 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionPinConfigDialogComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-action-pin-config-dialog', encapsulation: ViewEncapsulation.None, template: "@if (Visible) {\n  <div class=\"apc-backdrop\" (click)=\"Cancel()\"></div>\n  <div class=\"apc-dialog\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"apc-title\">\n    <div class=\"apc-header\">\n      <h3 id=\"apc-title\">\n        <i class=\"fa-solid fa-thumbtack\"></i>\n        Pin Action\n      </h3>\n      <button class=\"apc-close\" (click)=\"Cancel()\" aria-label=\"Close\">\n        <i class=\"fa-solid fa-xmark\"></i>\n      </button>\n    </div>\n\n    <div class=\"apc-body\">\n      <div class=\"apc-action-chip\">\n        <i class=\"fa-solid fa-bolt\"></i>\n        <span>{{ ActionName }}</span>\n      </div>\n\n      <div class=\"apc-preview\">\n        <div class=\"apc-preview-card\" [style.background]=\"'linear-gradient(135deg, ' + AccentColor + ' 0%, ' + AccentColor + 'cc 100%)'\">\n          <div class=\"apc-preview-icon\">\n            <i [class]=\"FaIcon\"></i>\n          </div>\n          <div class=\"apc-preview-title\">{{ DisplayName || 'Untitled pin' }}</div>\n        </div>\n        <div class=\"apc-preview-hint\">Live preview of how your pin will look on Home</div>\n      </div>\n\n      <div class=\"apc-field\">\n        <label for=\"apc-name\">Pin title</label>\n        <input id=\"apc-name\" type=\"text\" class=\"mj-input\"\n               [(ngModel)]=\"DisplayName\"\n               placeholder=\"e.g. Run Weekly Sales Report\" />\n      </div>\n\n      <div class=\"apc-field\">\n        <label>Accent color</label>\n        <div class=\"apc-color-grid\">\n          @for (c of ColorPalette; track c.value) {\n            <button type=\"button\"\n                    class=\"apc-color-swatch\"\n                    [class.selected]=\"AccentColor === c.value\"\n                    [style.background]=\"c.value\"\n                    [attr.aria-label]=\"c.name\"\n                    (click)=\"SelectColor(c.value)\">\n              @if (AccentColor === c.value) {\n                <i class=\"fa-solid fa-check\"></i>\n              }\n            </button>\n          }\n        </div>\n      </div>\n\n      <div class=\"apc-field\">\n        <label>Icon</label>\n        <div class=\"apc-icon-grid\">\n          @for (icon of FaIconPalette; track icon) {\n            <button type=\"button\"\n                    class=\"apc-icon-swatch\"\n                    [class.selected]=\"FaIcon === icon\"\n                    (click)=\"SelectFaIcon(icon)\">\n              <i [class]=\"icon\"></i>\n            </button>\n          }\n        </div>\n      </div>\n\n      <div class=\"apc-field\">\n        <label>Parameters</label>\n        @if (IsLoadingParams) {\n          <div class=\"apc-params-loading\">\n            <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading parameters\u2026\n          </div>\n        } @else if (Params.length === 0) {\n          <div class=\"apc-params-empty\">This action takes no input parameters.</div>\n        } @else {\n          <div class=\"apc-params-help\">\n            Choose which parameters are <strong>preset</strong> (baked into the pin) vs.\n            <strong>prompted at runtime</strong> each time the pin is clicked.\n          </div>\n          <div class=\"apc-params-table\">\n            @for (p of Params; track p.Name) {\n              <div class=\"apc-param-row\">\n                <div class=\"apc-param-info\">\n                  <div class=\"apc-param-name\">\n                    {{ p.Name }}\n                    @if (p.IsRequired) { <span class=\"apc-param-req\">required</span> }\n                  </div>\n                  @if (p.Description) {\n                    <div class=\"apc-param-desc\">{{ p.Description }}</div>\n                  }\n                </div>\n                <div class=\"apc-param-mode\">\n                  <label class=\"apc-mode-option\" [class.selected]=\"p.Mode === 'preset'\">\n                    <input type=\"radio\"\n                           [name]=\"'mode-' + p.Name\"\n                           [checked]=\"p.Mode === 'preset'\"\n                           (change)=\"SetParamMode(p, 'preset')\" />\n                    <span>Preset</span>\n                  </label>\n                  <label class=\"apc-mode-option\" [class.selected]=\"p.Mode === 'runtime'\">\n                    <input type=\"radio\"\n                           [name]=\"'mode-' + p.Name\"\n                           [checked]=\"p.Mode === 'runtime'\"\n                           (change)=\"SetParamMode(p, 'runtime')\" />\n                    <span>Prompt</span>\n                  </label>\n                </div>\n                <div class=\"apc-param-value\">\n                  @if (p.Mode === 'preset') {\n                    <input type=\"text\" class=\"mj-input\"\n                           [(ngModel)]=\"p.PresetValue\"\n                           [placeholder]=\"p.DefaultValue || 'Preset value'\" />\n                  } @else {\n                    <span class=\"apc-runtime-hint\">\n                      <i class=\"fa-solid fa-keyboard\"></i> Asked at click time\n                    </span>\n                  }\n                </div>\n              </div>\n            }\n          </div>\n        }\n      </div>\n\n      @if (ErrorMessage) {\n        <div class=\"apc-error\">\n          <i class=\"fa-solid fa-triangle-exclamation\"></i> {{ ErrorMessage }}\n        </div>\n      }\n    </div>\n\n    <div class=\"apc-footer\">\n      <button type=\"button\" class=\"apc-btn primary\"\n              [disabled]=\"!CanSave()\"\n              (click)=\"Save()\">\n        <i class=\"fa-solid fa-thumbtack\"></i> Pin to Home\n      </button>\n      <button type=\"button\" class=\"apc-btn\" (click)=\"Cancel()\">\n        Cancel\n      </button>\n    </div>\n  </div>\n}\n", styles: [".apc-backdrop {\n    position: fixed;\n    inset: 0;\n    background: var(--mj-bg-overlay);\n    z-index: 9000;\n    animation: apc-fade-in 0.15s ease;\n}\n\n.apc-dialog {\n    position: fixed;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n    z-index: 9001;\n    width: min(640px, calc(100vw - 32px));\n    max-height: calc(100vh - 48px);\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);\n    display: flex;\n    flex-direction: column;\n    animation: apc-pop-in 0.18s ease;\n}\n\n@keyframes apc-fade-in {\n    from { opacity: 0; }\n    to { opacity: 1; }\n}\n\n@keyframes apc-pop-in {\n    from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }\n    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n.apc-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 20px;\n    border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.apc-header h3 {\n    margin: 0;\n    font-size: 17px;\n    font-weight: 600;\n    display: flex;\n    align-items: center;\n    gap: 10px;\n    color: var(--mj-text-primary);\n}\n\n.apc-header h3 i {\n    color: var(--mj-brand-primary);\n}\n\n.apc-close {\n    background: transparent;\n    border: none;\n    color: var(--mj-text-muted);\n    font-size: 16px;\n    cursor: pointer;\n    padding: 6px 10px;\n    border-radius: 6px;\n}\n\n.apc-close:hover {\n    background: var(--mj-bg-surface-hover);\n    color: var(--mj-text-primary);\n}\n\n.apc-body {\n    padding: 20px;\n    overflow-y: auto;\n    display: flex;\n    flex-direction: column;\n    gap: 20px;\n}\n\n.apc-action-chip {\n    display: inline-flex;\n    align-items: center;\n    gap: 8px;\n    padding: 6px 12px;\n    background: var(--mj-bg-surface-sunken);\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 999px;\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    align-self: flex-start;\n}\n\n.apc-action-chip i {\n    color: var(--mj-brand-primary);\n}\n\n.apc-preview {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    gap: 8px;\n}\n\n.apc-preview-card {\n    width: 180px;\n    height: 120px;\n    border-radius: 10px;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    gap: 8px;\n    color: var(--mj-text-inverse, white);\n    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n    transition: transform 0.15s ease;\n}\n\n.apc-preview-icon {\n    font-size: 34px;\n    line-height: 1;\n    color: var(--mj-text-inverse, white);\n}\n\n.apc-preview-title {\n    font-size: 13px;\n    font-weight: 600;\n    text-align: center;\n    padding: 0 12px;\n    max-width: 100%;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n}\n\n.apc-preview-hint {\n    font-size: 12px;\n    color: var(--mj-text-muted);\n}\n\n.apc-field {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n}\n\n.apc-field > label {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n\n.apc-color-grid {\n    display: grid;\n    grid-template-columns: repeat(8, 1fr);\n    gap: 8px;\n}\n\n.apc-color-swatch {\n    width: 100%;\n    aspect-ratio: 1;\n    border-radius: 8px;\n    border: 2px solid transparent;\n    cursor: pointer;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    color: var(--mj-text-inverse, white);\n    font-size: 12px;\n    transition: transform 0.1s ease;\n}\n\n.apc-color-swatch:hover {\n    transform: scale(1.08);\n}\n\n.apc-color-swatch.selected {\n    border-color: var(--mj-text-primary);\n    box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-text-primary);\n}\n\n.apc-icon-grid {\n    display: grid;\n    grid-template-columns: repeat(10, 1fr);\n    gap: 6px;\n    max-height: 180px;\n    overflow-y: auto;\n    padding: 4px;\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 8px;\n    background: var(--mj-bg-surface-sunken);\n}\n\n.apc-icon-swatch {\n    aspect-ratio: 1;\n    background: var(--mj-bg-surface);\n    border: 1px solid transparent;\n    border-radius: 6px;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    font-size: 14px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    transition: all 0.1s ease;\n}\n\n.apc-icon-swatch:hover {\n    background: var(--mj-bg-surface-hover);\n    color: var(--mj-text-primary);\n}\n\n.apc-icon-swatch.selected {\n    background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n    color: var(--mj-brand-primary);\n    border-color: var(--mj-brand-primary);\n}\n\n.apc-params-loading,\n.apc-params-empty {\n    padding: 16px;\n    text-align: center;\n    font-size: 13px;\n    color: var(--mj-text-muted);\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 8px;\n}\n\n.apc-params-help {\n    font-size: 12px;\n    color: var(--mj-text-muted);\n    margin-bottom: 4px;\n}\n\n.apc-params-help strong {\n    color: var(--mj-text-secondary);\n}\n\n.apc-params-table {\n    display: flex;\n    flex-direction: column;\n    gap: 6px;\n    max-height: 260px;\n    overflow-y: auto;\n    padding-right: 4px;\n}\n\n.apc-param-row {\n    display: grid;\n    grid-template-columns: 1fr 160px 1fr;\n    gap: 10px;\n    align-items: center;\n    padding: 10px 12px;\n    background: var(--mj-bg-surface-sunken);\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 6px;\n}\n\n.apc-param-name {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    display: flex;\n    align-items: center;\n    gap: 6px;\n}\n\n.apc-param-req {\n    font-size: 10px;\n    font-weight: 500;\n    padding: 1px 6px;\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n    border-radius: 3px;\n    text-transform: uppercase;\n    letter-spacing: 0.4px;\n}\n\n.apc-param-desc {\n    font-size: 11px;\n    color: var(--mj-text-muted);\n    margin-top: 2px;\n    line-height: 1.4;\n}\n\n.apc-param-mode {\n    display: flex;\n    gap: 4px;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-subtle);\n    border-radius: 6px;\n    padding: 2px;\n}\n\n.apc-mode-option {\n    flex: 1;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 4px 8px;\n    border-radius: 4px;\n    font-size: 11px;\n    font-weight: 500;\n    color: var(--mj-text-muted);\n    cursor: pointer;\n    transition: all 0.1s ease;\n}\n\n.apc-mode-option input {\n    display: none;\n}\n\n.apc-mode-option.selected {\n    background: var(--mj-brand-primary);\n    color: var(--mj-text-inverse, white);\n}\n\n.apc-runtime-hint {\n    font-size: 11px;\n    color: var(--mj-text-muted);\n    display: inline-flex;\n    align-items: center;\n    gap: 4px;\n    font-style: italic;\n}\n\n.apc-error {\n    padding: 10px 12px;\n    background: var(--mj-status-error-bg);\n    color: var(--mj-status-error-text);\n    border: 1px solid var(--mj-status-error-border);\n    border-radius: 6px;\n    font-size: 13px;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.apc-footer {\n    display: flex;\n    gap: 8px;\n    padding: 14px 20px;\n    border-top: 1px solid var(--mj-border-subtle);\n    background: var(--mj-bg-surface-card);\n    border-bottom-left-radius: 12px;\n    border-bottom-right-radius: 12px;\n}\n\n.apc-btn {\n    padding: 8px 16px;\n    border-radius: 6px;\n    font-size: 13px;\n    font-weight: 500;\n    cursor: pointer;\n    border: 1px solid var(--mj-border-default);\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n}\n\n.apc-btn:hover:not(:disabled) {\n    background: var(--mj-bg-surface-hover);\n}\n\n.apc-btn.primary {\n    background: var(--mj-brand-primary);\n    color: var(--mj-text-inverse, white);\n    border-color: var(--mj-brand-primary);\n}\n\n.apc-btn.primary:hover:not(:disabled) {\n    background: var(--mj-brand-primary-hover);\n}\n\n.apc-btn:disabled {\n    opacity: 0.5;\n    cursor: not-allowed;\n}\n"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], { Visible: [{
            type: Input
        }], ActionID: [{
            type: Input
        }], ActionName: [{
            type: Input
        }], ActionDescription: [{
            type: Input
        }], Result: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionPinConfigDialogComponent, { className: "ActionPinConfigDialogComponent", filePath: "src/Home/action-pin-config-dialog.component.ts", lineNumber: 65 }); })();
//# sourceMappingURL=action-pin-config-dialog.component.js.map