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 { EntityFormComponent } from '../../generated/Entities/Entity/entity.form.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@progress/kendo-angular-layout";
import * as i4 from "@memberjunction/ng-user-view-grid";
import * as i5 from "@memberjunction/ng-base-forms";
import * as i6 from "@memberjunction/ng-form-toolbar";
import * as i7 from "@memberjunction/ng-tabstrip";
function EntityFormExtendedComponent_form_1_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "form", 4, 0);
    i0.ɵɵelement(2, "mj-form-toolbar", 5);
    i0.ɵɵelementStart(3, "kendo-splitter", 6);
    i0.ɵɵlistener("layoutChange", function EntityFormExtendedComponent_form_1_Template_kendo_splitter_layoutChange_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.splitterLayoutChange()); });
    i0.ɵɵelementStart(4, "kendo-splitter-pane", 7)(5, "div", 8, 1)(7, "mj-form-section", 9);
    i0.ɵɵlistener("LoadComplete", function EntityFormExtendedComponent_form_1_Template_mj_form_section_LoadComplete_7_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CalcTopAreaHeight()); });
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(8, "kendo-splitter-pane")(9, "mj-tabstrip", 10);
    i0.ɵɵlistener("TabSelected", function EntityFormExtendedComponent_form_1_Template_mj_tabstrip_TabSelected_9_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTabSelect($event)); })("ResizeContainer", function EntityFormExtendedComponent_form_1_Template_mj_tabstrip_ResizeContainer_9_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.InvokeManualResize()); });
    i0.ɵɵelementStart(10, "mj-tab", 11);
    i0.ɵɵtext(11, " Fields ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "mj-tab-body");
    i0.ɵɵelement(13, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "mj-tab", 13);
    i0.ɵɵtext(15, " Permissions ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "mj-tab-body");
    i0.ɵɵelement(17, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(18, "mj-tab", 14);
    i0.ɵɵtext(19, " Details ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "mj-tab-body");
    i0.ɵɵelement(21, "mj-form-section", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(22, "mj-tab", 16);
    i0.ɵɵtext(23, " Audit ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(24, "mj-tab-body");
    i0.ɵɵelement(25, "mj-form-section", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(26, "mj-tab", 18);
    i0.ɵɵtext(27, " API ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(28, "mj-tab-body");
    i0.ɵɵelement(29, "mj-form-section", 19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(30, "mj-tab", 20);
    i0.ɵɵtext(31, " DB ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(32, "mj-tab-body");
    i0.ɵɵelement(33, "mj-form-section", 21);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(34, "mj-tab", 22);
    i0.ɵɵtext(35, " UI ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(36, "mj-tab-body");
    i0.ɵɵelement(37, "mj-form-section", 23);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(38, "mj-tab", 24);
    i0.ɵɵtext(39, " Relationships ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(40, "mj-tab-body");
    i0.ɵɵelement(41, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(42, "mj-tab", 25);
    i0.ɵɵtext(43, " AI Actions ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(44, "mj-tab-body");
    i0.ɵɵelement(45, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(46, "mj-tab", 26);
    i0.ɵɵtext(47, " Application Entities ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(48, "mj-tab-body");
    i0.ɵɵelement(49, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(50, "mj-tab", 27);
    i0.ɵɵtext(51, " User Views ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(52, "mj-tab-body");
    i0.ɵɵelement(53, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(54, "mj-tab", 28);
    i0.ɵɵtext(55, " Dataset Items ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(56, "mj-tab-body");
    i0.ɵɵelement(57, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(58, "mj-tab", 29);
    i0.ɵɵtext(59, " Entity Documents ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(60, "mj-tab-body");
    i0.ɵɵelement(61, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(62, "mj-tab", 30);
    i0.ɵɵtext(63, " Entity Record Documents ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(64, "mj-tab-body");
    i0.ɵɵelement(65, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(66, "mj-tab", 31);
    i0.ɵɵtext(67, " File Entity Record Links ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(68, "mj-tab-body");
    i0.ɵɵelement(69, "mj-user-view-grid", 12);
    i0.ɵɵelementEnd()()()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("form", ctx_r1);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("collapsible", true)("size", ctx_r1.TopAreaHeight);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("record", ctx_r1.record)("EditMode", ctx_r1.EditMode);
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Entity Fields"))("AllowLoad", ctx_r1.IsCurrentTab("Fields"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Entity Permissions"))("AllowLoad", ctx_r1.IsCurrentTab("Permissions"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("record", ctx_r1.record)("EditMode", ctx_r1.EditMode);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("record", ctx_r1.record)("EditMode", ctx_r1.EditMode);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("record", ctx_r1.record)("EditMode", ctx_r1.EditMode);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("record", ctx_r1.record)("EditMode", ctx_r1.EditMode);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("record", ctx_r1.record)("EditMode", ctx_r1.EditMode);
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Entity Relationships"))("AllowLoad", ctx_r1.IsCurrentTab("Relationships"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Entity AI Actions"))("AllowLoad", ctx_r1.IsCurrentTab("AI Actions"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Application Entities"))("AllowLoad", ctx_r1.IsCurrentTab("Application Entities"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("User Views"))("AllowLoad", ctx_r1.IsCurrentTab("User Views"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Dataset Items"))("AllowLoad", ctx_r1.IsCurrentTab("Dataset Items"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Entity Documents"))("AllowLoad", ctx_r1.IsCurrentTab("Entity Documents"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("Entity Record Documents"))("AllowLoad", ctx_r1.IsCurrentTab("Entity Record Documents"))("EditMode", ctx_r1.GridEditMode());
    i0.ɵɵadvance();
    i0.ɵɵproperty("Visible", ctx_r1.record.IsSaved);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("File Entity Record Links"))("AllowLoad", ctx_r1.IsCurrentTab("File Entity Record Links"))("EditMode", ctx_r1.GridEditMode());
} }
let EntityFormExtendedComponent = class EntityFormExtendedComponent extends EntityFormComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵEntityFormExtendedComponent_BaseFactory; return function EntityFormExtendedComponent_Factory(t) { return (ɵEntityFormExtendedComponent_BaseFactory || (ɵEntityFormExtendedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(EntityFormExtendedComponent)))(t || EntityFormExtendedComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityFormExtendedComponent, selectors: [["mj-entities-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [["form", "ngForm"], ["topArea", ""], [1, "record-form-container"], ["class", "record-form", 4, "ngIf"], [1, "record-form"], [3, "form"], ["orientation", "vertical", 3, "layoutChange"], [3, "collapsible", "size"], [1, "record-form-group"], ["Entity", "Entities", "Section", "top-area", 3, "LoadComplete", "record", "EditMode"], [3, "TabSelected", "ResizeContainer"], ["Name", "Fields"], [3, "Params", "AllowLoad", "EditMode"], ["Name", "Permissions"], ["Name", "Details"], ["Entity", "Entities", "Section", "details", 3, "record", "EditMode"], ["Name", "Audit"], ["Entity", "Entities", "Section", "audit", 3, "record", "EditMode"], ["Name", "API"], ["Entity", "Entities", "Section", "api", 3, "record", "EditMode"], ["Name", "DB"], ["Entity", "Entities", "Section", "db", 3, "record", "EditMode"], ["Name", "UI"], ["Entity", "Entities", "Section", "ui", 3, "record", "EditMode"], ["Name", "Relationships", 3, "Visible"], ["Name", "AI Actions", 3, "Visible"], ["Name", "Application Entities", 3, "Visible"], ["Name", "User Views", 3, "Visible"], ["Name", "Dataset Items", 3, "Visible"], ["Name", "Entity Documents", 3, "Visible"], ["Name", "Entity Record Documents", 3, "Visible"], ["Name", "File Entity Record Links", 3, "Visible"]], template: function EntityFormExtendedComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 2);
            i0.ɵɵtemplate(1, EntityFormExtendedComponent_form_1_Template, 70, 53, "form", 3);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record);
        } }, dependencies: [i1.NgIf, i2.ɵNgNoValidate, i2.NgControlStatusGroup, i2.NgForm, i3.SplitterComponent, i3.SplitterPaneComponent, i4.UserViewGridComponent, i5.SectionLoaderComponent, i6.FormToolbarComponent, i7.MJTabStripComponent, i7.MJTabBodyComponent, i7.MJTabComponent], styles: [".k-pane[_ngcontent-%COMP%] {\n  background-color: #F5F6FA;\n}\n\n.content-margin[_ngcontent-%COMP%] {\n  margin: 10px;\n} \n\n\na[_ngcontent-%COMP%] {\n  font-size: 14px;\n  font-weight: bolder;\n}\n\n.tab-header-icon[_ngcontent-%COMP%] {\n  margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] {\n  display: block;\n  flex-direction: column;\n  background-color: #F5F6FA;\n  padding: 0;\n  min-height: 100vh;\n}\n\n.record-form-group[_ngcontent-%COMP%] {\n  margin-top: 0px;\n  background-color: #F5F6FA;\n}\n\nbutton[_ngcontent-%COMP%] {\n  margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%] {\n  margin-bottom: 10px;\n}\n\n.k-splitter[_ngcontent-%COMP%] {\n  border-width: 0px;\n}\n\n.record-form-row[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: auto 1fr;\n  align-items: start;\n  gap: 10px;\n  margin-bottom: 12px;\n  padding-top: 5px;\n  padding-bottom: 5px;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n.record-form[_ngcontent-%COMP%]   .record-form-row[_ngcontent-%COMP%]    > [_ngcontent-%COMP%]:first-child {\n  font-weight: bold;\n  padding-right: 10px;\n} \n\n.record-form[_ngcontent-%COMP%]   .record-form-row[_ngcontent-%COMP%]    > span[_ngcontent-%COMP%] {\n  white-space: pre-line;\n  max-height: 300px;\n  overflow: auto;\n}\n\n \n\n@media (min-width: 768px) {\n  .record-form-row[_ngcontent-%COMP%] {\n    flex-direction: row;\n    align-items: center;\n  }\n\n  .record-form-row[_ngcontent-%COMP%]   label[_ngcontent-%COMP%] {\n    width: 240px;\n    margin-bottom: 0;\n  }\n}\n\n\n\n.form-panels-container[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: 16px;\n  background-color: #F5F6FA;\n}\n\n\n\n.form-panels-container[_ngcontent-%COMP%]    > .form-card[_ngcontent-%COMP%] {\n  width: 100%;\n}\n\n\n\n.form-panels-container[_ngcontent-%COMP%]   .related-entity-grid[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: 1fr;\n  gap: 16px;\n  width: 100%;\n}\n\n\n\n@media (min-width: 1400px) {\n  .form-panels-container[_ngcontent-%COMP%]   .related-entity-grid[_ngcontent-%COMP%] {\n    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));\n  }\n}\n\n.form-card[_ngcontent-%COMP%] {\n  background: white;\n  border-radius: 8px;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n  overflow: hidden;\n}\n\n.collapsible-card[_ngcontent-%COMP%] {\n  overflow: hidden;\n}\n\n.collapsible-header[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 20px 24px;\n  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);\n  border-bottom: 2px solid #e5e7eb;\n  cursor: pointer;\n  user-select: none;\n  transition: all 0.3s ease;\n}\n\n.collapsible-header[_ngcontent-%COMP%]:hover {\n  background: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);\n  border-bottom-color: #667eea;\n}\n\n.collapsible-title[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex: 1;\n}\n\n.collapsible-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 20px;\n  color: #667eea;\n}\n\n.collapsible-title[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: 18px;\n  font-weight: 600;\n  color: #1f2937;\n}\n\n.collapsible-header[_ngcontent-%COMP%]   .collapse-icon[_ngcontent-%COMP%] {\n  color: #6b7280;\n  transition: transform 0.3s ease;\n}\n\n.collapsible-body[_ngcontent-%COMP%] {\n  max-height: 2000px;\n  overflow: hidden;\n  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n  opacity: 1;\n}\n\n.collapsible-body.collapsed[_ngcontent-%COMP%] {\n  max-height: 0;\n  padding: 0;\n  opacity: 0;\n}\n\n.form-body[_ngcontent-%COMP%] {\n  padding: 24px;\n}\n\n\n\n.form-card.related-entity[_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);\n  border-left: 3px solid #3b82f6;\n}\n\n.form-card.related-entity[_ngcontent-%COMP%]   .collapsible-header[_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);\n}\n\n.form-card.related-entity[_ngcontent-%COMP%]   .collapsible-header[_ngcontent-%COMP%]:hover {\n  background: linear-gradient(135deg, #bfdbfe 0%, #e0f2fe 100%);\n  border-bottom-color: #3b82f6;\n}\n\n.form-card.related-entity[_ngcontent-%COMP%]   .collapsible-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  color: #3b82f6;\n}\n\n\n\n.form-section-controls[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 10px;\n  padding: 14px 18px;\n  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);\n  border-bottom: 2px solid #e5e7eb;\n  align-items: center;\n  flex-wrap: wrap;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n}\n\n.form-section-controls[_ngcontent-%COMP%]   .control-group[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 8px;\n  align-items: center;\n}\n\n.form-section-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n  padding: 8px 14px;\n  font-size: 13px;\n  border: 1px solid #d1d5db;\n  background: white;\n  color: #374151;\n  border-radius: 6px;\n  cursor: pointer;\n  transition: all 0.2s;\n  margin-right: 0;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  font-weight: 500;\n}\n\n.form-section-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover {\n  background: #667eea;\n  color: white;\n  border-color: #667eea;\n  transform: translateY(-1px);\n  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);\n}\n\n.form-section-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:active {\n  transform: translateY(0);\n}\n\n.form-section-controls[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  margin-right: 0;\n  font-size: 14px;\n}\n\n.form-section-controls[_ngcontent-%COMP%]   .section-search[_ngcontent-%COMP%] {\n  padding: 8px 14px;\n  font-size: 13px;\n  border: 1px solid #d1d5db;\n  border-radius: 6px;\n  width: 240px;\n  transition: all 0.2s;\n  background: white;\n}\n\n.form-section-controls[_ngcontent-%COMP%]   .section-search[_ngcontent-%COMP%]:focus {\n  outline: none;\n  border-color: #667eea;\n  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n}\n\n.form-section-controls[_ngcontent-%COMP%]   .section-search[_ngcontent-%COMP%]::placeholder {\n  color: #9ca3af;\n  font-style: italic;\n}\n\n.form-section-controls[_ngcontent-%COMP%]   .section-count[_ngcontent-%COMP%] {\n  font-size: 13px;\n  color: #6b7280;\n  margin-left: auto;\n  font-weight: 500;\n}\n\n\n\n.form-card.search-hidden[_ngcontent-%COMP%] {\n  display: none;\n}\n\n\n\n.section-count-badge[_ngcontent-%COMP%] {\n  background: #667eea;\n  color: white;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 600;\n}\n\n\n\n.collapsible-title[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]   .search-highlight[_ngcontent-%COMP%] {\n  background-color: #fef08a;\n  color: #854d0e;\n  padding: 2px 4px;\n  border-radius: 3px;\n  font-weight: 700;\n}\n\n\n\n.collapsible-title[_ngcontent-%COMP%]   .row-count-badge[_ngcontent-%COMP%] {\n  background: #10b981;\n  color: white;\n  padding: 3px 6px 2px 6px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 600;\n  margin-left: 8px;\n  vertical-align: middle;\n  position: relative;\n  top: -2px;\n  display: inline-block;\n  line-height: 1;\n}\n\n\n\n.collapsible-title[_ngcontent-%COMP%]   .row-count-badge.zero-rows[_ngcontent-%COMP%] {\n  background: #9ca3af;\n}"] }); }
};
EntityFormExtendedComponent = __decorate([
    RegisterClass(BaseFormComponent, 'Entities')
], EntityFormExtendedComponent);
export { EntityFormExtendedComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityFormExtendedComponent, [{
        type: Component,
        args: [{ selector: 'mj-entities-form', template: "<div class=\"record-form-container\">\n    <form *ngIf=\"record\" class=\"record-form\"  #form=\"ngForm\" >\n        <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n        <kendo-splitter orientation=\"vertical\" (layoutChange)=\"splitterLayoutChange()\" >\n            <kendo-splitter-pane [collapsible]=\"true\" [size]=\"TopAreaHeight\">\n                <div #topArea class=\"record-form-group\">\n                    <mj-form-section Entity=\"Entities\" Section=\"top-area\" [record]=\"record\" [EditMode]=\"this.EditMode\" (LoadComplete)=\"CalcTopAreaHeight()\"></mj-form-section>\n                </div>\n            </kendo-splitter-pane>\n            <kendo-splitter-pane>\n                <mj-tabstrip (TabSelected)=\"onTabSelect($event)\"  (ResizeContainer)=\"InvokeManualResize()\">\n                    <mj-tab Name=\"Fields\">\n                        Fields\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Entity Fields')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Fields')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"Permissions\">\n                        Permissions\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Entity Permissions')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Permissions')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"Details\">\n                        Details\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-form-section Entity=\"Entities\" Section=\"details\" [record]=\"record\" [EditMode]=\"this.EditMode\"></mj-form-section>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"Audit\">\n                        Audit\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-form-section Entity=\"Entities\" Section=\"audit\" [record]=\"record\" [EditMode]=\"this.EditMode\"></mj-form-section>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"API\">\n                        API\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-form-section Entity=\"Entities\" Section=\"api\" [record]=\"record\" [EditMode]=\"this.EditMode\"></mj-form-section>\n                    </mj-tab-body>\n\n\n                    <mj-tab Name=\"DB\">\n                        DB\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-form-section Entity=\"Entities\" Section=\"db\" [record]=\"record\" [EditMode]=\"this.EditMode\"></mj-form-section>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"UI\">\n                        UI\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-form-section Entity=\"Entities\" Section=\"ui\" [record]=\"record\" [EditMode]=\"this.EditMode\"></mj-form-section>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"Relationships\" [Visible]=\"record.IsSaved\">\n                        Relationships\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Entity Relationships')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Relationships')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body>\n\n\n                    <mj-tab Name=\"AI Actions\" [Visible]=\"record.IsSaved\">\n                        AI Actions\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Entity AI Actions')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('AI Actions')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body>\n\n\n                    <mj-tab Name=\"Application Entities\" [Visible]=\"record.IsSaved\">\n                        Application Entities\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Application Entities')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Application Entities')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body>\n\n                    <mj-tab Name=\"User Views\" [Visible]=\"record.IsSaved\">\n                        User Views\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('User Views')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('User Views')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body> \n                \n                    <mj-tab Name=\"Dataset Items\" [Visible]=\"record.IsSaved\">\n                        Dataset Items\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Dataset Items')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Dataset Items')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body> \n                \n                    <mj-tab Name=\"Entity Documents\" [Visible]=\"record.IsSaved\">\n                        Entity Documents\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Entity Documents')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Entity Documents')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body> \n                \n                    <mj-tab Name=\"Entity Record Documents\" [Visible]=\"record.IsSaved\">\n                        Entity Record Documents\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('Entity Record Documents')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('Entity Record Documents')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body> \n                \n                    <mj-tab Name=\"File Entity Record Links\" [Visible]=\"record.IsSaved\">\n                        File Entity Record Links\n                    </mj-tab>\n                    <mj-tab-body>\n                        <mj-user-view-grid [Params]=\"this.BuildRelationshipViewParamsByEntityName('File Entity Record Links')\"  \n                            [AllowLoad]=\"this.IsCurrentTab('File Entity Record Links')\"  \n                            [EditMode]=\"this.GridEditMode()\"  \n                        >\n                        </mj-user-view-grid>\n                    </mj-tab-body> \n                </mj-tabstrip>\n            </kendo-splitter-pane>\n        </kendo-splitter>\n    </form>\n  </div>\n    ", styles: [".k-pane {\n  background-color: #F5F6FA;\n}\n\n.content-margin {\n  margin: 10px;\n} \n\n\na {\n  font-size: 14px;\n  font-weight: bolder;\n}\n\n.tab-header-icon {\n  margin-right: 5px;\n}\n\n.record-form {\n  display: block;\n  flex-direction: column;\n  background-color: #F5F6FA;\n  padding: 0;\n  min-height: 100vh;\n}\n\n.record-form-group {\n  margin-top: 0px;\n  background-color: #F5F6FA;\n}\n\nbutton {\n  margin-right: 5px;\n}\n\n.record-form h2 {\n  margin-bottom: 10px;\n}\n\n.k-splitter {\n  border-width: 0px;\n}\n\n.record-form-row {\n  display: grid;\n  grid-template-columns: auto 1fr;\n  align-items: start;\n  gap: 10px;\n  margin-bottom: 12px;\n  padding-top: 5px;\n  padding-bottom: 5px;\n}\n\n\n/* .record-form .record-form-row:nth-child(odd) {\n  background-color: #f2f2f2; \n} */\n\n/* \n.record-form .record-form-row:nth-child(even) {\n  background-color: #ffffff;  \n} */\n\n.record-form .record-form-row > :first-child {\n  font-weight: bold;\n  padding-right: 10px;\n} \n\n.record-form .record-form-row > span {\n  white-space: pre-line;\n  max-height: 300px;\n  overflow: auto;\n}\n\n \n\n@media (min-width: 768px) {\n  .record-form-row {\n    flex-direction: row;\n    align-items: center;\n  }\n\n  .record-form-row label {\n    width: 240px;\n    margin-bottom: 0;\n  }\n}\n\n/* Collapsible Panel Styles */\n.form-panels-container {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: 16px;\n  background-color: #F5F6FA;\n}\n\n/* All field sections take full width */\n.form-panels-container > .form-card {\n  width: 100%;\n}\n\n/* Related entity grid container - responsive layout */\n.form-panels-container .related-entity-grid {\n  display: grid;\n  grid-template-columns: 1fr;\n  gap: 16px;\n  width: 100%;\n}\n\n/* Responsive multi-column layout for related entities on wider screens */\n@media (min-width: 1400px) {\n  .form-panels-container .related-entity-grid {\n    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));\n  }\n}\n\n.form-card {\n  background: white;\n  border-radius: 8px;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n  overflow: hidden;\n}\n\n.collapsible-card {\n  overflow: hidden;\n}\n\n.collapsible-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 20px 24px;\n  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);\n  border-bottom: 2px solid #e5e7eb;\n  cursor: pointer;\n  user-select: none;\n  transition: all 0.3s ease;\n}\n\n.collapsible-header:hover {\n  background: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);\n  border-bottom-color: #667eea;\n}\n\n.collapsible-title {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex: 1;\n}\n\n.collapsible-title i {\n  font-size: 20px;\n  color: #667eea;\n}\n\n.collapsible-title h3 {\n  margin: 0;\n  font-size: 18px;\n  font-weight: 600;\n  color: #1f2937;\n}\n\n.collapsible-header .collapse-icon {\n  color: #6b7280;\n  transition: transform 0.3s ease;\n}\n\n.collapsible-body {\n  max-height: 2000px;\n  overflow: hidden;\n  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n  opacity: 1;\n}\n\n.collapsible-body.collapsed {\n  max-height: 0;\n  padding: 0;\n  opacity: 0;\n}\n\n.form-body {\n  padding: 24px;\n}\n\n/* Related Entity Sections - Visual Distinction */\n.form-card.related-entity {\n  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);\n  border-left: 3px solid #3b82f6;\n}\n\n.form-card.related-entity .collapsible-header {\n  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);\n}\n\n.form-card.related-entity .collapsible-header:hover {\n  background: linear-gradient(135deg, #bfdbfe 0%, #e0f2fe 100%);\n  border-bottom-color: #3b82f6;\n}\n\n.form-card.related-entity .collapsible-title i {\n  color: #3b82f6;\n}\n\n/* Section Controls */\n.form-section-controls {\n  display: flex;\n  gap: 10px;\n  padding: 14px 18px;\n  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);\n  border-bottom: 2px solid #e5e7eb;\n  align-items: center;\n  flex-wrap: wrap;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n}\n\n.form-section-controls .control-group {\n  display: flex;\n  gap: 8px;\n  align-items: center;\n}\n\n.form-section-controls button {\n  padding: 8px 14px;\n  font-size: 13px;\n  border: 1px solid #d1d5db;\n  background: white;\n  color: #374151;\n  border-radius: 6px;\n  cursor: pointer;\n  transition: all 0.2s;\n  margin-right: 0;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  font-weight: 500;\n}\n\n.form-section-controls button:hover {\n  background: #667eea;\n  color: white;\n  border-color: #667eea;\n  transform: translateY(-1px);\n  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);\n}\n\n.form-section-controls button:active {\n  transform: translateY(0);\n}\n\n.form-section-controls button i {\n  margin-right: 0;\n  font-size: 14px;\n}\n\n.form-section-controls .section-search {\n  padding: 8px 14px;\n  font-size: 13px;\n  border: 1px solid #d1d5db;\n  border-radius: 6px;\n  width: 240px;\n  transition: all 0.2s;\n  background: white;\n}\n\n.form-section-controls .section-search:focus {\n  outline: none;\n  border-color: #667eea;\n  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n}\n\n.form-section-controls .section-search::placeholder {\n  color: #9ca3af;\n  font-style: italic;\n}\n\n.form-section-controls .section-count {\n  font-size: 13px;\n  color: #6b7280;\n  margin-left: auto;\n  font-weight: 500;\n}\n\n/* Hidden sections for search filter */\n.form-card.search-hidden {\n  display: none;\n}\n\n/* Section count badge */\n.section-count-badge {\n  background: #667eea;\n  color: white;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 600;\n}\n\n/* Search highlighting in section names */\n.collapsible-title h3 .search-highlight {\n  background-color: #fef08a;\n  color: #854d0e;\n  padding: 2px 4px;\n  border-radius: 3px;\n  font-weight: 700;\n}\n\n/* Row count badge in section headers */\n.collapsible-title .row-count-badge {\n  background: #10b981;\n  color: white;\n  padding: 3px 6px 2px 6px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 600;\n  margin-left: 8px;\n  vertical-align: middle;\n  position: relative;\n  top: -2px;\n  display: inline-block;\n  line-height: 1;\n}\n\n/* Gray badge for zero rows (loaded but empty) */\n.collapsible-title .row-count-badge.zero-rows {\n  background: #9ca3af;\n}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityFormExtendedComponent, { className: "EntityFormExtendedComponent", filePath: "src/lib/custom/Entities/entities-form.component.ts", lineNumber: 13 }); })();
export function LoadEntitiesFormComponent() {
    // does nothing, just prevents tree shaking
}
//# sourceMappingURL=entities-form.component.js.map