var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component } from '@angular/core';
import { RegisterClass } from '@memberjunction/global';
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@memberjunction/ng-user-view-grid";
import * as i3 from "@memberjunction/ng-base-forms";
import * as i4 from "@memberjunction/ng-form-toolbar";
function QueryFormComponent_div_29_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 34);
    i0.ɵɵlistener("dataLoaded", function QueryFormComponent_div_29_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("dataContextItems", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Data Context Items", "QueryID"))("NewRecordValues", ctx_r1.NewRecordValues("Data Context Items"))("AllowLoad", ctx_r1.IsSectionExpanded("dataContextItems"))("EditMode", ctx_r1.GridEditMode());
} }
function QueryFormComponent_div_31_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 34);
    i0.ɵɵlistener("dataLoaded", function QueryFormComponent_div_31_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("queryFields", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Query Fields", "QueryID"))("NewRecordValues", ctx_r1.NewRecordValues("Query Fields"))("AllowLoad", ctx_r1.IsSectionExpanded("queryFields"))("EditMode", ctx_r1.GridEditMode());
} }
function QueryFormComponent_div_33_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 34);
    i0.ɵɵlistener("dataLoaded", function QueryFormComponent_div_33_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("queryPermissions", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Query Permissions", "QueryID"))("NewRecordValues", ctx_r1.NewRecordValues("Query Permissions"))("AllowLoad", ctx_r1.IsSectionExpanded("queryPermissions"))("EditMode", ctx_r1.GridEditMode());
} }
function QueryFormComponent_div_35_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 34);
    i0.ɵɵlistener("dataLoaded", function QueryFormComponent_div_35_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("mJQueryParameters", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: Query Parameters", "QueryID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: Query Parameters"))("AllowLoad", ctx_r1.IsSectionExpanded("mJQueryParameters"))("EditMode", ctx_r1.GridEditMode());
} }
function QueryFormComponent_div_37_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 34);
    i0.ɵɵlistener("dataLoaded", function QueryFormComponent_div_37_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("queryEntities", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Query Entities", "QueryID"))("NewRecordValues", ctx_r1.NewRecordValues("Query Entities"))("AllowLoad", ctx_r1.IsSectionExpanded("queryEntities"))("EditMode", ctx_r1.GridEditMode());
} }
let QueryFormComponent = class QueryFormComponent extends BaseFormComponent {
    async ngOnInit() {
        await super.ngOnInit();
        this.initSections([
            { sectionKey: 'queryDefinition', sectionName: 'Query Definition', isExpanded: true },
            { sectionKey: 'performanceQuality', sectionName: 'Performance & Quality', isExpanded: true },
            { sectionKey: 'cachingExecutionSettings', sectionName: 'Caching & Execution Settings', isExpanded: false },
            { sectionKey: 'aIEmbeddings', sectionName: 'AI & Embeddings', isExpanded: false },
            { sectionKey: 'systemMetadata', sectionName: 'System Metadata', isExpanded: false },
            { sectionKey: 'dataContextItems', sectionName: 'Data Context Items', isExpanded: false },
            { sectionKey: 'queryFields', sectionName: 'Query Fields', isExpanded: false },
            { sectionKey: 'queryPermissions', sectionName: 'Query Permissions', isExpanded: false },
            { sectionKey: 'mJQueryParameters', sectionName: 'MJ: Query Parameters', isExpanded: false },
            { sectionKey: 'queryEntities', sectionName: 'Query Entities', isExpanded: false }
        ]);
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵQueryFormComponent_BaseFactory; return function QueryFormComponent_Factory(t) { return (ɵQueryFormComponent_BaseFactory || (ɵQueryFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(QueryFormComponent)))(t || QueryFormComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryFormComponent, selectors: [["gen-query-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 38, vars: 120, consts: [[3, "record", "formComponent"], ["slot", "field-panels", "sectionKey", "queryDefinition", "sectionName", "Query Definition", "icon", "fa fa-file-code", 3, "form", "formContext"], ["FieldName", "Name", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "CategoryID", "Type", "textbox", "LinkType", "Record", "LinkComponentType", "Search", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "UserQuestion", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "Description", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "SQL", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "TechnicalDescription", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "OriginalSQL", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "UsesTemplate", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "Category", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "field-panels", "sectionKey", "performanceQuality", "sectionName", "Performance & Quality", "icon", "fa fa-chart-line", 3, "form", "formContext"], ["FieldName", "Feedback", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "Status", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "QualityRank", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "ExecutionCostRank", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "field-panels", "sectionKey", "cachingExecutionSettings", "sectionName", "Caching & Execution Settings", "icon", "fa fa-sliders-h", 3, "form", "formContext"], ["FieldName", "AuditQueryRuns", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "CacheEnabled", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "CacheTTLMinutes", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "CacheMaxSize", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "field-panels", "sectionKey", "aIEmbeddings", "sectionName", "AI & Embeddings", "icon", "fa fa-brain", 3, "form", "formContext"], ["FieldName", "EmbeddingVector", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "EmbeddingModelID", "Type", "textbox", "LinkType", "Record", "LinkComponentType", "Search", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "EmbeddingModel", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "field-panels", "sectionKey", "systemMetadata", "sectionName", "System Metadata", "icon", "fa fa-cog", 3, "form", "formContext"], ["FieldName", "__mj_CreatedAt", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "__mj_UpdatedAt", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "after-panels", "sectionKey", "dataContextItems", "sectionName", "Data Context Items", "icon", "fa fa-database", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], [4, "ngIf"], ["slot", "after-panels", "sectionKey", "queryFields", "sectionName", "Query Fields", "icon", "fa fa-table", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], ["slot", "after-panels", "sectionKey", "queryPermissions", "sectionName", "Query Permissions", "icon", "fa fa-shield-alt", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], ["slot", "after-panels", "sectionKey", "mJQueryParameters", "sectionName", "MJ: Query Parameters", "icon", "fa fa-code", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], ["slot", "after-panels", "sectionKey", "queryEntities", "sectionName", "Query Entities", "icon", "fa fa-search", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], [3, "dataLoaded", "Params", "NewRecordValues", "AllowLoad", "EditMode"]], template: function QueryFormComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "mj-record-form-container", 0)(1, "mj-collapsible-panel", 1);
            i0.ɵɵelement(2, "mj-form-field", 2)(3, "mj-form-field", 3)(4, "mj-form-field", 4)(5, "mj-form-field", 5)(6, "mj-form-field", 6)(7, "mj-form-field", 7)(8, "mj-form-field", 8)(9, "mj-form-field", 9)(10, "mj-form-field", 10);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(11, "mj-collapsible-panel", 11);
            i0.ɵɵelement(12, "mj-form-field", 12)(13, "mj-form-field", 13)(14, "mj-form-field", 14)(15, "mj-form-field", 15);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "mj-collapsible-panel", 16);
            i0.ɵɵelement(17, "mj-form-field", 17)(18, "mj-form-field", 18)(19, "mj-form-field", 19)(20, "mj-form-field", 20);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(21, "mj-collapsible-panel", 21);
            i0.ɵɵelement(22, "mj-form-field", 22)(23, "mj-form-field", 23)(24, "mj-form-field", 24);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(25, "mj-collapsible-panel", 25);
            i0.ɵɵelement(26, "mj-form-field", 26)(27, "mj-form-field", 27);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(28, "mj-collapsible-panel", 28);
            i0.ɵɵtemplate(29, QueryFormComponent_div_29_Template, 2, 4, "div", 29);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(30, "mj-collapsible-panel", 30);
            i0.ɵɵtemplate(31, QueryFormComponent_div_31_Template, 2, 4, "div", 29);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(32, "mj-collapsible-panel", 31);
            i0.ɵɵtemplate(33, QueryFormComponent_div_33_Template, 2, 4, "div", 29);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(34, "mj-collapsible-panel", 32);
            i0.ɵɵtemplate(35, QueryFormComponent_div_35_Template, 2, 4, "div", 29);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(36, "mj-collapsible-panel", 33);
            i0.ɵɵtemplate(37, QueryFormComponent_div_37_Template, 2, 4, "div", 29);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵproperty("record", ctx.record)("formComponent", ctx);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("record", ctx.record)("ShowLabel", true)("EditMode", ctx.EditMode)("formContext", ctx.formContext);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext)("badgeCount", ctx.GetSectionRowCount("dataContextItems"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext)("badgeCount", ctx.GetSectionRowCount("queryFields"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext)("badgeCount", ctx.GetSectionRowCount("queryPermissions"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext)("badgeCount", ctx.GetSectionRowCount("mJQueryParameters"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext)("badgeCount", ctx.GetSectionRowCount("queryEntities"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
        } }, dependencies: [i1.NgIf, i2.UserViewGridComponent, i3.MJFormField, i3.CollapsiblePanelComponent, i4.RecordFormContainerComponent], encapsulation: 2 }); }
};
QueryFormComponent = __decorate([
    RegisterClass(BaseFormComponent, 'Queries') // Tell MemberJunction about this class
], QueryFormComponent);
export { QueryFormComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryFormComponent, [{
        type: Component,
        args: [{ selector: 'gen-query-form', template: "<mj-record-form-container [record]=\"record\" [formComponent]=\"this\">\n\n    <!-- ========================================\n         FIELD PANELS\n         ======================================== -->\n    <!-- Query Definition Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"queryDefinition\"\n        sectionName=\"Query Definition\"\n        icon=\"fa fa-file-code\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Name\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"CategoryID\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n            LinkType=\"Record\"\n            LinkComponentType=\"Search\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"UserQuestion\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Description\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"SQL\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"TechnicalDescription\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"OriginalSQL\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"UsesTemplate\"\n            Type=\"checkbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Category\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- Performance & Quality Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"performanceQuality\"\n        sectionName=\"Performance & Quality\"\n        icon=\"fa fa-chart-line\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Feedback\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Status\"\n            Type=\"dropdownlist\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"QualityRank\"\n            Type=\"numerictextbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"ExecutionCostRank\"\n            Type=\"numerictextbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- Caching & Execution Settings Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"cachingExecutionSettings\"\n        sectionName=\"Caching & Execution Settings\"\n        icon=\"fa fa-sliders-h\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"AuditQueryRuns\"\n            Type=\"checkbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"CacheEnabled\"\n            Type=\"checkbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"CacheTTLMinutes\"\n            Type=\"numerictextbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"CacheMaxSize\"\n            Type=\"numerictextbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- AI & Embeddings Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"aIEmbeddings\"\n        sectionName=\"AI & Embeddings\"\n        icon=\"fa fa-brain\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"EmbeddingVector\"\n            Type=\"textarea\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"EmbeddingModelID\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n            LinkType=\"Record\"\n            LinkComponentType=\"Search\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"EmbeddingModel\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- System Metadata Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"systemMetadata\"\n        sectionName=\"System Metadata\"\n        icon=\"fa fa-cog\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"__mj_CreatedAt\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"__mj_UpdatedAt\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n    <!-- ========================================\n         RELATED ENTITY PANELS - AFTER\n         ======================================== -->\n\n    <!-- Data Context Items Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"dataContextItems\"\n        sectionName=\"Data Context Items\"\n        icon=\"fa fa-database\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('dataContextItems')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('Data Context Items','QueryID')\"\n                [NewRecordValues]=\"NewRecordValues('Data Context Items')\"\n                [AllowLoad]=\"IsSectionExpanded('dataContextItems')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('dataContextItems', $event.totalRowCount)\"\n                >\n            </mj-user-view-grid>\n        </div>\n    </mj-collapsible-panel>\n\n    <!-- Query Fields Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"queryFields\"\n        sectionName=\"Query Fields\"\n        icon=\"fa fa-table\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('queryFields')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('Query Fields','QueryID')\"\n                [NewRecordValues]=\"NewRecordValues('Query Fields')\"\n                [AllowLoad]=\"IsSectionExpanded('queryFields')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('queryFields', $event.totalRowCount)\"\n                >\n            </mj-user-view-grid>\n        </div>\n    </mj-collapsible-panel>\n\n    <!-- Query Permissions Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"queryPermissions\"\n        sectionName=\"Query Permissions\"\n        icon=\"fa fa-shield-alt\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('queryPermissions')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('Query Permissions','QueryID')\"\n                [NewRecordValues]=\"NewRecordValues('Query Permissions')\"\n                [AllowLoad]=\"IsSectionExpanded('queryPermissions')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('queryPermissions', $event.totalRowCount)\"\n                >\n            </mj-user-view-grid>\n        </div>\n    </mj-collapsible-panel>\n\n    <!-- MJ: Query Parameters Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"mJQueryParameters\"\n        sectionName=\"MJ: Query Parameters\"\n        icon=\"fa fa-code\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('mJQueryParameters')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Query Parameters','QueryID')\"\n                [NewRecordValues]=\"NewRecordValues('MJ: Query Parameters')\"\n                [AllowLoad]=\"IsSectionExpanded('mJQueryParameters')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('mJQueryParameters', $event.totalRowCount)\"\n                >\n            </mj-user-view-grid>\n        </div>\n    </mj-collapsible-panel>\n\n    <!-- Query Entities Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"queryEntities\"\n        sectionName=\"Query Entities\"\n        icon=\"fa fa-search\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('queryEntities')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('Query Entities','QueryID')\"\n                [NewRecordValues]=\"NewRecordValues('Query Entities')\"\n                [AllowLoad]=\"IsSectionExpanded('queryEntities')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('queryEntities', $event.totalRowCount)\"\n                >\n            </mj-user-view-grid>\n        </div>\n    </mj-collapsible-panel>\n</mj-record-form-container>\n        " }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryFormComponent, { className: "QueryFormComponent", filePath: "src/lib/generated/Entities/Query/query.form.component.ts", lineNumber: 12 }); })();
export function LoadQueryFormComponent() {
    // does nothing, but called to prevent tree-shaking from eliminating this component from the build
}
//# sourceMappingURL=query.form.component.js.map