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 "@memberjunction/ng-base-forms";
function MJDataContextFormComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-explorer-entity-data-grid", 13);
    i0.ɵɵlistener("Navigate", function MJDataContextFormComponent_Conditional_11_Template_mj_explorer_entity_data_grid_Navigate_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnFormNavigate($event)); })("AfterDataLoad", function MJDataContextFormComponent_Conditional_11_Template_mj_explorer_entity_data_grid_AfterDataLoad_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("mJDataContextItems", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: Data Context Items", "DataContextID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: Data Context Items"))("AllowLoad", ctx_r1.IsSectionExpanded("mJDataContextItems"))("ShowToolbar", false);
} }
function MJDataContextFormComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-explorer-entity-data-grid", 13);
    i0.ɵɵlistener("Navigate", function MJDataContextFormComponent_Conditional_13_Template_mj_explorer_entity_data_grid_Navigate_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnFormNavigate($event)); })("AfterDataLoad", function MJDataContextFormComponent_Conditional_13_Template_mj_explorer_entity_data_grid_AfterDataLoad_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("mJReports", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: Reports", "DataContextID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: Reports"))("AllowLoad", ctx_r1.IsSectionExpanded("mJReports"))("ShowToolbar", false);
} }
function MJDataContextFormComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-explorer-entity-data-grid", 13);
    i0.ɵɵlistener("Navigate", function MJDataContextFormComponent_Conditional_15_Template_mj_explorer_entity_data_grid_Navigate_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnFormNavigate($event)); })("AfterDataLoad", function MJDataContextFormComponent_Conditional_15_Template_mj_explorer_entity_data_grid_AfterDataLoad_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("mJConversations", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: Conversations", "DataContextID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: Conversations"))("AllowLoad", ctx_r1.IsSectionExpanded("mJConversations"))("ShowToolbar", false);
} }
let MJDataContextFormComponent = class MJDataContextFormComponent extends BaseFormComponent {
    async ngOnInit() {
        await super.ngOnInit();
        this.initSections([
            { sectionKey: 'identifiers', sectionName: 'Identifiers', isExpanded: true },
            { sectionKey: 'contextDetails', sectionName: 'Context Details', isExpanded: true },
            { sectionKey: 'systemMetadata', sectionName: 'System Metadata', isExpanded: false },
            { sectionKey: 'mJDataContextItems', sectionName: 'Data Context Items', isExpanded: false },
            { sectionKey: 'mJReports', sectionName: 'Reports', isExpanded: false },
            { sectionKey: 'mJConversations', sectionName: 'Conversations', isExpanded: false }
        ]);
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵMJDataContextFormComponent_BaseFactory; return function MJDataContextFormComponent_Factory(__ngFactoryType__) { return (ɵMJDataContextFormComponent_BaseFactory || (ɵMJDataContextFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJDataContextFormComponent)))(__ngFactoryType__ || MJDataContextFormComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJDataContextFormComponent, selectors: [["gen-mjdatacontext-form"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 16, vars: 47, consts: [[3, "Navigate", "DeleteRequested", "FavoriteToggled", "HistoryRequested", "ListManagementRequested", "Record", "FormComponent"], ["SectionKey", "identifiers", "SectionName", "Identifiers", "Icon", "fa fa-key", 3, "Form", "FormContext"], ["FieldName", "UserID", "Type", "textbox", "LinkType", "Record", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["SectionKey", "contextDetails", "SectionName", "Context Details", "Icon", "fa fa-info-circle", 3, "Form", "FormContext"], ["FieldName", "Name", "Type", "textbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "Description", "Type", "textarea", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "LastRefreshedAt", "Type", "datepicker", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["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"], ["SectionKey", "mJDataContextItems", "SectionName", "Data Context Items", "Icon", "fa fa-database", "Variant", "related-entity", 3, "Form", "FormContext", "BadgeCount", "DefaultExpanded"], ["SectionKey", "mJReports", "SectionName", "Reports", "Icon", "fa-solid fa-chart-line", "Variant", "related-entity", 3, "Form", "FormContext", "BadgeCount", "DefaultExpanded"], ["SectionKey", "mJConversations", "SectionName", "Conversations", "Icon", "fa-regular fa-comments", "Variant", "related-entity", 3, "Form", "FormContext", "BadgeCount", "DefaultExpanded"], [3, "Navigate", "AfterDataLoad", "Params", "NewRecordValues", "AllowLoad", "ShowToolbar"]], template: function MJDataContextFormComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "mj-record-form-container", 0);
            i0.ɵɵlistener("Navigate", function MJDataContextFormComponent_Template_mj_record_form_container_Navigate_0_listener($event) { return ctx.OnFormNavigate($event); })("DeleteRequested", function MJDataContextFormComponent_Template_mj_record_form_container_DeleteRequested_0_listener() { return ctx.OnDeleteRequested(); })("FavoriteToggled", function MJDataContextFormComponent_Template_mj_record_form_container_FavoriteToggled_0_listener() { return ctx.OnFavoriteToggled(); })("HistoryRequested", function MJDataContextFormComponent_Template_mj_record_form_container_HistoryRequested_0_listener() { return ctx.OnHistoryRequested(); })("ListManagementRequested", function MJDataContextFormComponent_Template_mj_record_form_container_ListManagementRequested_0_listener() { return ctx.OnListManagementRequested(); });
            i0.ɵɵelementStart(1, "mj-collapsible-panel", 1);
            i0.ɵɵelement(2, "mj-form-field", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(3, "mj-collapsible-panel", 3);
            i0.ɵɵelement(4, "mj-form-field", 4)(5, "mj-form-field", 5)(6, "mj-form-field", 6);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(7, "mj-collapsible-panel", 7);
            i0.ɵɵelement(8, "mj-form-field", 8)(9, "mj-form-field", 9);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(10, "mj-collapsible-panel", 10);
            i0.ɵɵconditionalCreate(11, MJDataContextFormComponent_Conditional_11_Template, 2, 4, "div");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(12, "mj-collapsible-panel", 11);
            i0.ɵɵconditionalCreate(13, MJDataContextFormComponent_Conditional_13_Template, 2, 4, "div");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(14, "mj-collapsible-panel", 12);
            i0.ɵɵconditionalCreate(15, MJDataContextFormComponent_Conditional_15_Template, 2, 4, "div");
            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", false)("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("mJDataContextItems"))("DefaultExpanded", false);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.record.IsSaved ? 11 : -1);
            i0.ɵɵadvance();
            i0.ɵɵproperty("Form", ctx)("FormContext", ctx.formContext)("BadgeCount", ctx.GetSectionRowCount("mJReports"))("DefaultExpanded", false);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.record.IsSaved ? 13 : -1);
            i0.ɵɵadvance();
            i0.ɵɵproperty("Form", ctx)("FormContext", ctx.formContext)("BadgeCount", ctx.GetSectionRowCount("mJConversations"))("DefaultExpanded", false);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.record.IsSaved ? 15 : -1);
        } }, dependencies: [i1.MjFormFieldComponent, i1.MjCollapsiblePanelComponent, i1.MjRecordFormContainerComponent, i1.ExplorerEntityDataGridComponent], encapsulation: 2 }); }
};
MJDataContextFormComponent = __decorate([
    RegisterClass(BaseFormComponent, 'MJ: Data Contexts') // Tell MemberJunction about this class
], MJDataContextFormComponent);
export { MJDataContextFormComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJDataContextFormComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'gen-mjdatacontext-form', template: "<mj-record-form-container [Record]=\"record\" [FormComponent]=\"this\"\n    (Navigate)=\"OnFormNavigate($event)\"\n    (DeleteRequested)=\"OnDeleteRequested()\"\n    (FavoriteToggled)=\"OnFavoriteToggled()\"\n    (HistoryRequested)=\"OnHistoryRequested()\"\n    (ListManagementRequested)=\"OnListManagementRequested()\">\n\n    <!-- ========================================\n         FIELD PANELS\n         ======================================== -->\n    <!-- Identifiers Section -->\n    <mj-collapsible-panel\n        SectionKey=\"identifiers\"\n        SectionName=\"Identifiers\"\n        Icon=\"fa fa-key\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\">\n        <mj-form-field \n            [Record]=\"record\"\n            [ShowLabel]=\"false\"\n            FieldName=\"UserID\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [FormContext]=\"formContext\"\n            LinkType=\"Record\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- Context Details Section -->\n    <mj-collapsible-panel\n        SectionKey=\"contextDetails\"\n        SectionName=\"Context Details\"\n        Icon=\"fa fa-info-circle\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\">\n        <mj-form-field \n            [Record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Name\"\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=\"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=\"LastRefreshedAt\"\n            Type=\"datepicker\"\n            [EditMode]=\"EditMode\"\n            [FormContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- System Metadata Section -->\n    <mj-collapsible-panel\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    <!-- ========================================\n         RELATED ENTITY PANELS\n         ======================================== -->\n\n    <!-- Data Context Items Section -->\n    <mj-collapsible-panel\n        SectionKey=\"mJDataContextItems\"\n        SectionName=\"Data Context Items\"\n        Icon=\"fa fa-database\"\n        Variant=\"related-entity\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\"\n        [BadgeCount]=\"GetSectionRowCount('mJDataContextItems')\"\n        [DefaultExpanded]=\"false\">\n        @if (record.IsSaved) {\n        <div>\n            <mj-explorer-entity-data-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Data Context Items','DataContextID')\"\n                [NewRecordValues]=\"NewRecordValues('MJ: Data Context Items')\"\n                [AllowLoad]=\"IsSectionExpanded('mJDataContextItems')\"\n                [ShowToolbar]=\"false\"\n                (Navigate)=\"OnFormNavigate($event)\"\n                (AfterDataLoad)=\"SetSectionRowCount('mJDataContextItems', $event.totalRowCount)\"\n                >\n            </mj-explorer-entity-data-grid>\n        </div>\n        }\n    </mj-collapsible-panel>\n\n    <!-- Reports Section -->\n    <mj-collapsible-panel\n        SectionKey=\"mJReports\"\n        SectionName=\"Reports\"\n        Icon=\"fa-solid fa-chart-line\"\n        Variant=\"related-entity\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\"\n        [BadgeCount]=\"GetSectionRowCount('mJReports')\"\n        [DefaultExpanded]=\"false\">\n        @if (record.IsSaved) {\n        <div>\n            <mj-explorer-entity-data-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Reports','DataContextID')\"\n                [NewRecordValues]=\"NewRecordValues('MJ: Reports')\"\n                [AllowLoad]=\"IsSectionExpanded('mJReports')\"\n                [ShowToolbar]=\"false\"\n                (Navigate)=\"OnFormNavigate($event)\"\n                (AfterDataLoad)=\"SetSectionRowCount('mJReports', $event.totalRowCount)\"\n                >\n            </mj-explorer-entity-data-grid>\n        </div>\n        }\n    </mj-collapsible-panel>\n\n    <!-- Conversations Section -->\n    <mj-collapsible-panel\n        SectionKey=\"mJConversations\"\n        SectionName=\"Conversations\"\n        Icon=\"fa-regular fa-comments\"\n        Variant=\"related-entity\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\"\n        [BadgeCount]=\"GetSectionRowCount('mJConversations')\"\n        [DefaultExpanded]=\"false\">\n        @if (record.IsSaved) {\n        <div>\n            <mj-explorer-entity-data-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Conversations','DataContextID')\"\n                [NewRecordValues]=\"NewRecordValues('MJ: Conversations')\"\n                [AllowLoad]=\"IsSectionExpanded('mJConversations')\"\n                [ShowToolbar]=\"false\"\n                (Navigate)=\"OnFormNavigate($event)\"\n                (AfterDataLoad)=\"SetSectionRowCount('mJConversations', $event.totalRowCount)\"\n                >\n            </mj-explorer-entity-data-grid>\n        </div>\n        }\n    </mj-collapsible-panel>\n</mj-record-form-container>\n        " }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJDataContextFormComponent, { className: "MJDataContextFormComponent", filePath: "src/lib/generated/Entities/MJDataContext/mjdatacontext.form.component.ts", lineNumber: 13 }); })();
//# sourceMappingURL=mjdatacontext.form.component.js.map