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";
import * as i2 from "@memberjunction/ng-join-grid";
const _c0 = () => ["Name", "Status", "AdditionalAttributes"];
const _c1 = a0 => ({ CommunicationProviderID: a0 });
function MJCommunicationProviderFormComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "mj-join-grid", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ShowSaveButton", false)("ShowCancelButton", false)("EditMode", ctx_r0.GridEditMode())("JoinEntityExtraFilter", "CommunicationProviderID=" + ctx_r0.record.ID)("JoinEntityDisplayColumns", i0.ɵɵpureFunction0(6, _c0))("NewRecordDefaultValues", i0.ɵɵpureFunction1(7, _c1, ctx_r0.record.ID));
} }
function MJCommunicationProviderFormComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-explorer-entity-data-grid", 19);
    i0.ɵɵlistener("Navigate", function MJCommunicationProviderFormComponent_Conditional_19_Template_mj_explorer_entity_data_grid_Navigate_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnFormNavigate($event)); })("AfterDataLoad", function MJCommunicationProviderFormComponent_Conditional_19_Template_mj_explorer_entity_data_grid_AfterDataLoad_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.SetSectionRowCount("mJCommunicationLogs", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r0.BuildRelationshipViewParamsByEntityName("MJ: Communication Logs", "CommunicationProviderID"))("NewRecordValues", ctx_r0.NewRecordValues("MJ: Communication Logs"))("AllowLoad", ctx_r0.IsSectionExpanded("mJCommunicationLogs"))("ShowToolbar", false);
} }
let MJCommunicationProviderFormComponent = class MJCommunicationProviderFormComponent extends BaseFormComponent {
    async ngOnInit() {
        await super.ngOnInit();
        this.initSections([
            { sectionKey: 'providerDetails', sectionName: 'Provider Details', isExpanded: true },
            { sectionKey: 'operationalSettings', sectionName: 'Operational Settings', isExpanded: true },
            { sectionKey: 'advancedCapabilities', sectionName: 'Advanced Capabilities', isExpanded: false },
            { sectionKey: 'systemMetadata', sectionName: 'System Metadata', isExpanded: false },
            { sectionKey: 'mJCommunicationProviderMessageTypes', sectionName: 'Message Types', isExpanded: false },
            { sectionKey: 'mJCommunicationLogs', sectionName: 'Communication Logs', isExpanded: false }
        ]);
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵMJCommunicationProviderFormComponent_BaseFactory; return function MJCommunicationProviderFormComponent_Factory(__ngFactoryType__) { return (ɵMJCommunicationProviderFormComponent_BaseFactory || (ɵMJCommunicationProviderFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJCommunicationProviderFormComponent)))(__ngFactoryType__ || MJCommunicationProviderFormComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCommunicationProviderFormComponent, selectors: [["gen-mjcommunicationprovider-form"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 20, vars: 64, consts: [[3, "Navigate", "DeleteRequested", "FavoriteToggled", "HistoryRequested", "ListManagementRequested", "Record", "FormComponent"], ["SectionKey", "providerDetails", "SectionName", "Provider Details", "Icon", "fa fa-id-card", 3, "Form", "FormContext"], ["FieldName", "Name", "Type", "textbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "Description", "Type", "textarea", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["SectionKey", "operationalSettings", "SectionName", "Operational Settings", "Icon", "fa fa-cog", 3, "Form", "FormContext"], ["FieldName", "Status", "Type", "select", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "SupportsSending", "Type", "checkbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "SupportsReceiving", "Type", "checkbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["SectionKey", "advancedCapabilities", "SectionName", "Advanced Capabilities", "Icon", "fa fa-cogs", 3, "Form", "FormContext"], ["FieldName", "SupportsScheduledSending", "Type", "checkbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "SupportsForwarding", "Type", "checkbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "SupportsReplying", "Type", "checkbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "SupportsDrafts", "Type", "checkbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["SectionKey", "systemMetadata", "SectionName", "System Metadata", "Icon", "fa fa-database", 3, "Form", "FormContext"], ["FieldName", "__mj_CreatedAt", "Type", "textbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["FieldName", "__mj_UpdatedAt", "Type", "textbox", 3, "Record", "ShowLabel", "EditMode", "FormContext"], ["SectionKey", "mJCommunicationProviderMessageTypes", "SectionName", "Message Types", "Icon", "fa fa-comment", "Variant", "related-entity", 3, "Form", "FormContext", "BadgeCount", "DefaultExpanded"], ["SectionKey", "mJCommunicationLogs", "SectionName", "Communication Logs", "Icon", "fa fa-comment", "Variant", "related-entity", 3, "Form", "FormContext", "BadgeCount", "DefaultExpanded"], ["RowsEntityName", "MJ: Communication Base Message Types", "RowsEntityDisplayField", "Type", "RowsExtraFilter", "", "RowsEntityDataSource", "FullEntity", "RowsOrderBy", "Type", "RowsEntityDisplayName", "Base Type", "ColumnsMode", "Fields", "JoinEntityName", "MJ: Communication Provider Message Types", "JoinEntityRowForeignKey", "CommunicationBaseMessageTypeID", 3, "ShowSaveButton", "ShowCancelButton", "EditMode", "JoinEntityExtraFilter", "JoinEntityDisplayColumns", "NewRecordDefaultValues"], [3, "Navigate", "AfterDataLoad", "Params", "NewRecordValues", "AllowLoad", "ShowToolbar"]], template: function MJCommunicationProviderFormComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "mj-record-form-container", 0);
            i0.ɵɵlistener("Navigate", function MJCommunicationProviderFormComponent_Template_mj_record_form_container_Navigate_0_listener($event) { return ctx.OnFormNavigate($event); })("DeleteRequested", function MJCommunicationProviderFormComponent_Template_mj_record_form_container_DeleteRequested_0_listener() { return ctx.OnDeleteRequested(); })("FavoriteToggled", function MJCommunicationProviderFormComponent_Template_mj_record_form_container_FavoriteToggled_0_listener() { return ctx.OnFavoriteToggled(); })("HistoryRequested", function MJCommunicationProviderFormComponent_Template_mj_record_form_container_HistoryRequested_0_listener() { return ctx.OnHistoryRequested(); })("ListManagementRequested", function MJCommunicationProviderFormComponent_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)(3, "mj-form-field", 3);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(4, "mj-collapsible-panel", 4);
            i0.ɵɵelement(5, "mj-form-field", 5)(6, "mj-form-field", 6)(7, "mj-form-field", 7);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(8, "mj-collapsible-panel", 8);
            i0.ɵɵelement(9, "mj-form-field", 9)(10, "mj-form-field", 10)(11, "mj-form-field", 11)(12, "mj-form-field", 12);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(13, "mj-collapsible-panel", 13);
            i0.ɵɵelement(14, "mj-form-field", 14)(15, "mj-form-field", 15);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "mj-collapsible-panel", 16);
            i0.ɵɵconditionalCreate(17, MJCommunicationProviderFormComponent_Conditional_17_Template, 2, 9, "div");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(18, "mj-collapsible-panel", 17);
            i0.ɵɵconditionalCreate(19, MJCommunicationProviderFormComponent_Conditional_19_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", 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("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("mJCommunicationProviderMessageTypes"))("DefaultExpanded", false);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.record.IsSaved ? 17 : -1);
            i0.ɵɵadvance();
            i0.ɵɵproperty("Form", ctx)("FormContext", ctx.formContext)("BadgeCount", ctx.GetSectionRowCount("mJCommunicationLogs"))("DefaultExpanded", false);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.record.IsSaved ? 19 : -1);
        } }, dependencies: [i1.MjFormFieldComponent, i1.MjCollapsiblePanelComponent, i1.MjRecordFormContainerComponent, i1.ExplorerEntityDataGridComponent, i2.JoinGridComponent], encapsulation: 2 }); }
};
MJCommunicationProviderFormComponent = __decorate([
    RegisterClass(BaseFormComponent, 'MJ: Communication Providers') // Tell MemberJunction about this class
], MJCommunicationProviderFormComponent);
export { MJCommunicationProviderFormComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCommunicationProviderFormComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'gen-mjcommunicationprovider-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    <!-- Provider Details Section -->\n    <mj-collapsible-panel\n        SectionKey=\"providerDetails\"\n        SectionName=\"Provider Details\"\n        Icon=\"fa fa-id-card\"\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\n    </mj-collapsible-panel>\n\n    <!-- Operational Settings Section -->\n    <mj-collapsible-panel\n        SectionKey=\"operationalSettings\"\n        SectionName=\"Operational Settings\"\n        Icon=\"fa fa-cog\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\">\n        <mj-form-field \n            [Record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Status\"\n            Type=\"select\"\n            [EditMode]=\"EditMode\"\n            [FormContext]=\"formContext\"\n        ></mj-form-field>\n        <mj-form-field \n            [Record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"SupportsSending\"\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=\"SupportsReceiving\"\n            Type=\"checkbox\"\n            [EditMode]=\"EditMode\"\n            [FormContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- Advanced Capabilities Section -->\n    <mj-collapsible-panel\n        SectionKey=\"advancedCapabilities\"\n        SectionName=\"Advanced Capabilities\"\n        Icon=\"fa fa-cogs\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\">\n        <mj-form-field \n            [Record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"SupportsScheduledSending\"\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=\"SupportsForwarding\"\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=\"SupportsReplying\"\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=\"SupportsDrafts\"\n            Type=\"checkbox\"\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-database\"\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    <!-- Message Types Section -->\n    <mj-collapsible-panel\n        SectionKey=\"mJCommunicationProviderMessageTypes\"\n        SectionName=\"Message Types\"\n        Icon=\"fa fa-comment\"\n        Variant=\"related-entity\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\"\n        [BadgeCount]=\"GetSectionRowCount('mJCommunicationProviderMessageTypes')\"\n        [DefaultExpanded]=\"false\">\n        @if (record.IsSaved) {\n        <div>\n            <mj-join-grid\n                [ShowSaveButton]=\"false\"\n                [ShowCancelButton]=\"false\"\n                [EditMode]=\"GridEditMode()\"\n                RowsEntityName=\"MJ: Communication Base Message Types\"\n                RowsEntityDisplayField=\"Type\"\n                RowsExtraFilter=\"\"\n                RowsEntityDataSource=\"FullEntity\"\n                RowsOrderBy=\"Type\"\n                RowsEntityDisplayName=\"Base Type\"\n                ColumnsMode=\"Fields\"\n                JoinEntityName=\"MJ: Communication Provider Message Types\"\n                JoinEntityRowForeignKey=\"CommunicationBaseMessageTypeID\"\n                [JoinEntityExtraFilter]=\"'CommunicationProviderID=' + record.ID\"\n                [JoinEntityDisplayColumns]=\"['Name','Status','AdditionalAttributes']\"\n                [NewRecordDefaultValues]=\"{CommunicationProviderID: record.ID}\"\n            >\n            </mj-join-grid>\n            \n        </div>\n        }\n    </mj-collapsible-panel>\n\n    <!-- Communication Logs Section -->\n    <mj-collapsible-panel\n        SectionKey=\"mJCommunicationLogs\"\n        SectionName=\"Communication Logs\"\n        Icon=\"fa fa-comment\"\n        Variant=\"related-entity\"\n        [Form]=\"this\"\n        [FormContext]=\"formContext\"\n        [BadgeCount]=\"GetSectionRowCount('mJCommunicationLogs')\"\n        [DefaultExpanded]=\"false\">\n        @if (record.IsSaved) {\n        <div>\n            <mj-explorer-entity-data-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: Communication Logs','CommunicationProviderID')\"\n                [NewRecordValues]=\"NewRecordValues('MJ: Communication Logs')\"\n                [AllowLoad]=\"IsSectionExpanded('mJCommunicationLogs')\"\n                [ShowToolbar]=\"false\"\n                (Navigate)=\"OnFormNavigate($event)\"\n                (AfterDataLoad)=\"SetSectionRowCount('mJCommunicationLogs', $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(MJCommunicationProviderFormComponent, { className: "MJCommunicationProviderFormComponent", filePath: "src/lib/generated/Entities/MJCommunicationProvider/mjcommunicationprovider.form.component.ts", lineNumber: 14 }); })();
//# sourceMappingURL=mjcommunicationprovider.form.component.js.map