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, ChangeDetectionStrategy } from '@angular/core';
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
import { RegisterClass } from '@memberjunction/global';
import { MJTestRubricFormComponent } from '../../generated/Entities/MJTestRubric/mjtestrubric.form.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/common";
let MJTestRubricFormComponentExtended = class MJTestRubricFormComponentExtended extends MJTestRubricFormComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵMJTestRubricFormComponentExtended_BaseFactory; return function MJTestRubricFormComponentExtended_Factory(__ngFactoryType__) { return (ɵMJTestRubricFormComponentExtended_BaseFactory || (ɵMJTestRubricFormComponentExtended_BaseFactory = i0.ɵɵgetInheritedFactory(MJTestRubricFormComponentExtended)))(__ngFactoryType__ || MJTestRubricFormComponentExtended); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTestRubricFormComponentExtended, selectors: [["mj-test-rubric-form"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 39, vars: 16, consts: [[1, "rubric-form"], [1, "rubric-header"], [1, "fas", "fa-clipboard-list"], [1, "status-badge"], [1, "rubric-content"], [1, "field-group"], ["type", "text", 3, "ngModelChange", "ngModel"], ["rows", "4", 3, "ngModelChange", "ngModel"], ["rows", "12", 1, "json-editor", 3, "ngModelChange", "ngModel"], [3, "ngModelChange", "ngModel"], ["value", "Active"], ["value", "Disabled"], [1, "metadata"]], template: function MJTestRubricFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2");
            i0.ɵɵelement(3, "i", 2);
            i0.ɵɵtext(4);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "span", 3);
            i0.ɵɵtext(6);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(7, "div", 4)(8, "div", 5)(9, "label");
            i0.ɵɵtext(10, "Name");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(11, "input", 6);
            i0.ɵɵtwoWayListener("ngModelChange", function MJTestRubricFormComponentExtended_Template_input_ngModelChange_11_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.record.Name, $event) || (ctx.record.Name = $event); return $event; });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(12, "div", 5)(13, "label");
            i0.ɵɵtext(14, "Description");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(15, "textarea", 7);
            i0.ɵɵtwoWayListener("ngModelChange", function MJTestRubricFormComponentExtended_Template_textarea_ngModelChange_15_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.record.Description, $event) || (ctx.record.Description = $event); return $event; });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(16, "div", 5)(17, "label");
            i0.ɵɵtext(18, "Prompt Template");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(19, "textarea", 8);
            i0.ɵɵtwoWayListener("ngModelChange", function MJTestRubricFormComponentExtended_Template_textarea_ngModelChange_19_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.record.PromptTemplate, $event) || (ctx.record.PromptTemplate = $event); return $event; });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(20, "div", 5)(21, "label");
            i0.ɵɵtext(22, "Status");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(23, "select", 9);
            i0.ɵɵtwoWayListener("ngModelChange", function MJTestRubricFormComponentExtended_Template_select_ngModelChange_23_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.record.Status, $event) || (ctx.record.Status = $event); return $event; });
            i0.ɵɵelementStart(24, "option", 10);
            i0.ɵɵtext(25, "Active");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(26, "option", 11);
            i0.ɵɵtext(27, "Disabled");
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(28, "div", 12)(29, "div")(30, "strong");
            i0.ɵɵtext(31, "Created:");
            i0.ɵɵelementEnd();
            i0.ɵɵtext(32);
            i0.ɵɵpipe(33, "date");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(34, "div")(35, "strong");
            i0.ɵɵtext(36, "Updated:");
            i0.ɵɵelementEnd();
            i0.ɵɵtext(37);
            i0.ɵɵpipe(38, "date");
            i0.ɵɵelementEnd()()()();
        } if (rf & 2) {
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate1(" ", ctx.record.Name || "Test Rubric");
            i0.ɵɵadvance();
            i0.ɵɵstyleProp("background-color", ctx.record.Status === "Active" ? "#4caf50" : "#9e9e9e");
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.record.Status, " ");
            i0.ɵɵadvance(5);
            i0.ɵɵtwoWayProperty("ngModel", ctx.record.Name);
            i0.ɵɵadvance(4);
            i0.ɵɵtwoWayProperty("ngModel", ctx.record.Description);
            i0.ɵɵadvance(4);
            i0.ɵɵtwoWayProperty("ngModel", ctx.record.PromptTemplate);
            i0.ɵɵadvance(4);
            i0.ɵɵtwoWayProperty("ngModel", ctx.record.Status);
            i0.ɵɵadvance(9);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(33, 10, ctx.record.__mj_CreatedAt, "medium"));
            i0.ɵɵadvance(5);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(38, 13, ctx.record.__mj_UpdatedAt, "medium"));
        } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.DatePipe], styles: [".rubric-form[_ngcontent-%COMP%] { padding: 20px; }\n    .rubric-header[_ngcontent-%COMP%] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }\n    .rubric-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%] { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 12px; }\n    .status-badge[_ngcontent-%COMP%] { padding: 4px 12px; border-radius: 12px; color: var(--mj-text-inverse); font-size: 12px; font-weight: 600; }\n    .rubric-content[_ngcontent-%COMP%] { background: var(--mj-bg-surface); padding: 24px; border-radius: 8px; }\n    .field-group[_ngcontent-%COMP%] { margin-bottom: 20px; }\n    .field-group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%] { display: block; margin-bottom: 8px; font-weight: 600; color: var(--mj-text-primary); }\n    .field-group[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .field-group[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%], .field-group[_ngcontent-%COMP%]   select[_ngcontent-%COMP%] { width: 100%; padding: 8px 12px; border: 1px solid var(--mj-border-default); border-radius: 4px; }\n    .json-editor[_ngcontent-%COMP%] { font-family: 'Courier New', monospace; font-size: 13px; }\n    .metadata[_ngcontent-%COMP%] { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--mj-border-default); display: flex; gap: 24px; font-size: 13px; color: var(--mj-text-secondary); }"], changeDetection: 0 }); }
};
MJTestRubricFormComponentExtended = __decorate([
    RegisterClass(BaseFormComponent, 'MJ: Test Rubrics')
], MJTestRubricFormComponentExtended);
export { MJTestRubricFormComponentExtended };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJTestRubricFormComponentExtended, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-test-rubric-form', template: `
    <div class="rubric-form">
      <div class="rubric-header">
        <h2><i class="fas fa-clipboard-list"></i> {{ record.Name || 'Test Rubric' }}</h2>
        <span class="status-badge" [style.background-color]="record.Status === 'Active' ? '#4caf50' : '#9e9e9e'">
          {{ record.Status }}
        </span>
      </div>
      <div class="rubric-content">
        <div class="field-group">
          <label>Name</label>
          <input type="text" [(ngModel)]="record.Name" />
        </div>
        <div class="field-group">
          <label>Description</label>
          <textarea [(ngModel)]="record.Description" rows="4"></textarea>
        </div>
        <div class="field-group">
          <label>Prompt Template</label>
          <textarea [(ngModel)]="record.PromptTemplate" rows="12" class="json-editor"></textarea>
        </div>
        <div class="field-group">
          <label>Status</label>
          <select [(ngModel)]="record.Status">
            <option value="Active">Active</option>
            <option value="Disabled">Disabled</option>
          </select>
        </div>
        <div class="metadata">
          <div><strong>Created:</strong> {{ record.__mj_CreatedAt | date:'medium' }}</div>
          <div><strong>Updated:</strong> {{ record.__mj_UpdatedAt | date:'medium' }}</div>
        </div>
      </div>
    </div>
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["\n    .rubric-form { padding: 20px; }\n    .rubric-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }\n    .rubric-header h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 12px; }\n    .status-badge { padding: 4px 12px; border-radius: 12px; color: var(--mj-text-inverse); font-size: 12px; font-weight: 600; }\n    .rubric-content { background: var(--mj-bg-surface); padding: 24px; border-radius: 8px; }\n    .field-group { margin-bottom: 20px; }\n    .field-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--mj-text-primary); }\n    .field-group input, .field-group textarea, .field-group select { width: 100%; padding: 8px 12px; border: 1px solid var(--mj-border-default); border-radius: 4px; }\n    .json-editor { font-family: 'Courier New', monospace; font-size: 13px; }\n    .metadata { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--mj-border-default); display: flex; gap: 24px; font-size: 13px; color: var(--mj-text-secondary); }\n  "] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJTestRubricFormComponentExtended, { className: "MJTestRubricFormComponentExtended", filePath: "src/lib/custom/Tests/test-rubric-form.component.ts", lineNumber: 60 }); })();
//# sourceMappingURL=test-rubric-form.component.js.map