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 ListCategoryFormComponent_div_15_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 17);
    i0.ɵɵlistener("dataLoaded", function ListCategoryFormComponent_div_15_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("listCategories", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("List Categories", "ParentID"))("NewRecordValues", ctx_r1.NewRecordValues("List Categories"))("AllowLoad", ctx_r1.IsSectionExpanded("listCategories"))("EditMode", ctx_r1.GridEditMode());
} }
function ListCategoryFormComponent_div_17_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "mj-user-view-grid", 17);
    i0.ɵɵlistener("dataLoaded", function ListCategoryFormComponent_div_17_Template_mj_user_view_grid_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetSectionRowCount("lists", $event.totalRowCount)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Lists", "CategoryID"))("NewRecordValues", ctx_r1.NewRecordValues("Lists"))("AllowLoad", ctx_r1.IsSectionExpanded("lists"))("EditMode", ctx_r1.GridEditMode());
} }
let ListCategoryFormComponent = class ListCategoryFormComponent extends BaseFormComponent {
    async ngOnInit() {
        await super.ngOnInit();
        this.initSections([
            { sectionKey: 'categoryDetails', sectionName: 'Category Details', isExpanded: true },
            { sectionKey: 'categoryHierarchy', sectionName: 'Category Hierarchy', isExpanded: true },
            { sectionKey: 'ownershipAudit', sectionName: 'Ownership & Audit', isExpanded: false },
            { sectionKey: 'systemMetadata', sectionName: 'System Metadata', isExpanded: false },
            { sectionKey: 'listCategories', sectionName: 'List Categories', isExpanded: false },
            { sectionKey: 'lists', sectionName: 'Lists', isExpanded: false }
        ]);
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵListCategoryFormComponent_BaseFactory; return function ListCategoryFormComponent_Factory(t) { return (ɵListCategoryFormComponent_BaseFactory || (ɵListCategoryFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ListCategoryFormComponent)))(t || ListCategoryFormComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListCategoryFormComponent, selectors: [["gen-listcategory-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 18, vars: 54, consts: [[3, "record", "formComponent"], ["slot", "field-panels", "sectionKey", "categoryDetails", "sectionName", "Category Details", "icon", "fa fa-tag", 3, "form", "formContext"], ["FieldName", "Name", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "Description", "Type", "textarea", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "field-panels", "sectionKey", "categoryHierarchy", "sectionName", "Category Hierarchy", "icon", "fa fa-sitemap", 3, "form", "formContext"], ["FieldName", "ParentID", "Type", "textbox", "LinkType", "Record", "LinkComponentType", "Dropdown", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "Parent", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "RootParentID", "Type", "textbox", 3, "record", "ShowLabel", "EditMode", "formContext"], ["slot", "field-panels", "sectionKey", "ownershipAudit", "sectionName", "Ownership & Audit", "icon", "fa fa-user-cog", 3, "form", "formContext"], ["FieldName", "UserID", "Type", "textbox", "LinkType", "Record", "LinkComponentType", "Dropdown", 3, "record", "ShowLabel", "EditMode", "formContext"], ["FieldName", "User", "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", "listCategories", "sectionName", "List Categories", "icon", "fa fa-list", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], [4, "ngIf"], ["slot", "after-panels", "sectionKey", "lists", "sectionName", "Lists", "icon", "fa fa-list-ul", "variant", "related-entity", 3, "form", "formContext", "badgeCount"], [3, "dataLoaded", "Params", "NewRecordValues", "AllowLoad", "EditMode"]], template: function ListCategoryFormComponent_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);
            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);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(11, "mj-collapsible-panel", 11);
            i0.ɵɵelement(12, "mj-form-field", 12)(13, "mj-form-field", 13);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(14, "mj-collapsible-panel", 14);
            i0.ɵɵtemplate(15, ListCategoryFormComponent_div_15_Template, 2, 4, "div", 15);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "mj-collapsible-panel", 16);
            i0.ɵɵtemplate(17, ListCategoryFormComponent_div_17_Template, 2, 4, "div", 15);
            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("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("listCategories"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
            i0.ɵɵadvance();
            i0.ɵɵproperty("form", ctx)("formContext", ctx.formContext)("badgeCount", ctx.GetSectionRowCount("lists"));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.IsSaved);
        } }, dependencies: [i1.NgIf, i2.UserViewGridComponent, i3.MJFormField, i3.CollapsiblePanelComponent, i4.RecordFormContainerComponent], encapsulation: 2 }); }
};
ListCategoryFormComponent = __decorate([
    RegisterClass(BaseFormComponent, 'List Categories') // Tell MemberJunction about this class
], ListCategoryFormComponent);
export { ListCategoryFormComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListCategoryFormComponent, [{
        type: Component,
        args: [{ selector: 'gen-listcategory-form', template: "<mj-record-form-container [record]=\"record\" [formComponent]=\"this\">\n\n    <!-- ========================================\n         FIELD PANELS\n         ======================================== -->\n    <!-- Category Details Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"categoryDetails\"\n        sectionName=\"Category Details\"\n        icon=\"fa fa-tag\"\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    <!-- Category Hierarchy Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"categoryHierarchy\"\n        sectionName=\"Category Hierarchy\"\n        icon=\"fa fa-sitemap\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"ParentID\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n            LinkType=\"Record\"\n            LinkComponentType=\"Dropdown\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"Parent\"\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=\"RootParentID\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n        ></mj-form-field>\n\n    </mj-collapsible-panel>\n\n    <!-- Ownership & Audit Section -->\n    <mj-collapsible-panel slot=\"field-panels\"\n        sectionKey=\"ownershipAudit\"\n        sectionName=\"Ownership & Audit\"\n        icon=\"fa fa-user-cog\"\n        [form]=\"this\"\n        [formContext]=\"formContext\">\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"UserID\"\n            Type=\"textbox\"\n            [EditMode]=\"EditMode\"\n            [formContext]=\"formContext\"\n            LinkType=\"Record\"\n            LinkComponentType=\"Dropdown\"\n        ></mj-form-field>\n        <mj-form-field \n            [record]=\"record\"\n            [ShowLabel]=\"true\"\n            FieldName=\"User\"\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    <!-- List Categories Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"listCategories\"\n        sectionName=\"List Categories\"\n        icon=\"fa fa-list\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('listCategories')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('List Categories','ParentID')\"\n                [NewRecordValues]=\"NewRecordValues('List Categories')\"\n                [AllowLoad]=\"IsSectionExpanded('listCategories')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('listCategories', $event.totalRowCount)\"\n                >\n            </mj-user-view-grid>\n        </div>\n    </mj-collapsible-panel>\n\n    <!-- Lists Section -->\n    <mj-collapsible-panel slot=\"after-panels\"\n        sectionKey=\"lists\"\n        sectionName=\"Lists\"\n        icon=\"fa fa-list-ul\"\n        variant=\"related-entity\"\n        [form]=\"this\"\n        [formContext]=\"formContext\"\n        [badgeCount]=\"GetSectionRowCount('lists')\">\n        <div *ngIf=\"record.IsSaved\">\n            <mj-user-view-grid\n                [Params]=\"BuildRelationshipViewParamsByEntityName('Lists','CategoryID')\"\n                [NewRecordValues]=\"NewRecordValues('Lists')\"\n                [AllowLoad]=\"IsSectionExpanded('lists')\"\n                [EditMode]=\"GridEditMode()\"\n                (dataLoaded)=\"SetSectionRowCount('lists', $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(ListCategoryFormComponent, { className: "ListCategoryFormComponent", filePath: "src/lib/generated/Entities/ListCategory/listcategory.form.component.ts", lineNumber: 12 }); })();
export function LoadListCategoryFormComponent() {
    // does nothing, but called to prevent tree-shaking from eliminating this component from the build
}
//# sourceMappingURL=listcategory.form.component.js.map