import {
  ClientDatatableComponent
} from "./chunk-3RTU34A3.js";
import "./chunk-YWQICJL7.js";
import "./chunk-BP5JJWGC.js";
import "./chunk-IGGXREIH.js";
import {
  require_sweetalert2_all
} from "./chunk-KLTWPXW2.js";
import {
  ToastrService
} from "./chunk-2YLAF7RI.js";
import {
  CommonSharedModule,
  OrderByPipe
} from "./chunk-7NQGM4EA.js";
import {
  DefaultValueAccessor,
  FormBuilder,
  FormControl,
  FormControlName,
  FormGroupDirective,
  FormGroupName,
  MinValidator,
  NgControlStatus,
  NgControlStatusGroup,
  NgSelectOption,
  NumberValueAccessor,
  ReactiveFormsModule,
  RequiredValidator,
  SelectControlValueAccessor,
  TranslatePipe,
  TranslateService,
  Validators,
  ɵNgNoValidate,
  ɵNgSelectMultipleOption
} from "./chunk-NLYGDKUR.js";
import "./chunk-ZEL7H2AL.js";
import {
  GridApiService,
  LocalStorageService,
  Router
} from "./chunk-P7K2QEDI.js";
import {
  AnonymousSubject,
  NgClass,
  NgForOf,
  NgIf,
  Observable,
  ReplaySubject,
  Subject,
  Subscriber,
  Subscription,
  ɵsetClassDebugInfo,
  ɵɵStandaloneFeature,
  ɵɵadvance,
  ɵɵdefineComponent,
  ɵɵdirectiveInject,
  ɵɵelement,
  ɵɵelementContainerEnd,
  ɵɵelementContainerStart,
  ɵɵelementEnd,
  ɵɵelementStart,
  ɵɵgetCurrentView,
  ɵɵlistener,
  ɵɵnextContext,
  ɵɵpipe,
  ɵɵpipeBind1,
  ɵɵpipeBind2,
  ɵɵproperty,
  ɵɵpropertyInterpolate,
  ɵɵpureFunction0,
  ɵɵpureFunction1,
  ɵɵresetView,
  ɵɵrestoreView,
  ɵɵstyleProp,
  ɵɵtemplate,
  ɵɵtext,
  ɵɵtextInterpolate,
  ɵɵtextInterpolate1,
  ɵɵtextInterpolate2,
  ɵɵtextInterpolate3
} from "./chunk-GKZIWABI.js";
import {
  __async,
  __spreadProps,
  __spreadValues,
  __toESM
} from "./chunk-CVWHNZRK.js";

// src/app/@lcp-framework/pages/import-master/import-master.component.ts
var import_sweetalert2 = __toESM(require_sweetalert2_all());

// node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js
var DEFAULT_WEBSOCKET_CONFIG = {
  url: "",
  deserializer: (e) => JSON.parse(e.data),
  serializer: (value) => JSON.stringify(value)
};
var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = "WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }";
var WebSocketSubject = class _WebSocketSubject extends AnonymousSubject {
  constructor(urlConfigOrSource, destination) {
    super();
    this._socket = null;
    if (urlConfigOrSource instanceof Observable) {
      this.destination = destination;
      this.source = urlConfigOrSource;
    } else {
      const config = this._config = Object.assign({}, DEFAULT_WEBSOCKET_CONFIG);
      this._output = new Subject();
      if (typeof urlConfigOrSource === "string") {
        config.url = urlConfigOrSource;
      } else {
        for (const key in urlConfigOrSource) {
          if (urlConfigOrSource.hasOwnProperty(key)) {
            config[key] = urlConfigOrSource[key];
          }
        }
      }
      if (!config.WebSocketCtor && WebSocket) {
        config.WebSocketCtor = WebSocket;
      } else if (!config.WebSocketCtor) {
        throw new Error("no WebSocket constructor can be found");
      }
      this.destination = new ReplaySubject();
    }
  }
  lift(operator) {
    const sock = new _WebSocketSubject(this._config, this.destination);
    sock.operator = operator;
    sock.source = this;
    return sock;
  }
  _resetState() {
    this._socket = null;
    if (!this.source) {
      this.destination = new ReplaySubject();
    }
    this._output = new Subject();
  }
  multiplex(subMsg, unsubMsg, messageFilter) {
    const self = this;
    return new Observable((observer) => {
      try {
        self.next(subMsg());
      } catch (err) {
        observer.error(err);
      }
      const subscription = self.subscribe({
        next: (x) => {
          try {
            if (messageFilter(x)) {
              observer.next(x);
            }
          } catch (err) {
            observer.error(err);
          }
        },
        error: (err) => observer.error(err),
        complete: () => observer.complete()
      });
      return () => {
        try {
          self.next(unsubMsg());
        } catch (err) {
          observer.error(err);
        }
        subscription.unsubscribe();
      };
    });
  }
  _connectSocket() {
    const { WebSocketCtor, protocol, url, binaryType } = this._config;
    const observer = this._output;
    let socket = null;
    try {
      socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url);
      this._socket = socket;
      if (binaryType) {
        this._socket.binaryType = binaryType;
      }
    } catch (e) {
      observer.error(e);
      return;
    }
    const subscription = new Subscription(() => {
      this._socket = null;
      if (socket && socket.readyState === 1) {
        socket.close();
      }
    });
    socket.onopen = (evt) => {
      const { _socket } = this;
      if (!_socket) {
        socket.close();
        this._resetState();
        return;
      }
      const { openObserver } = this._config;
      if (openObserver) {
        openObserver.next(evt);
      }
      const queue = this.destination;
      this.destination = Subscriber.create((x) => {
        if (socket.readyState === 1) {
          try {
            const { serializer } = this._config;
            socket.send(serializer(x));
          } catch (e) {
            this.destination.error(e);
          }
        }
      }, (err) => {
        const { closingObserver } = this._config;
        if (closingObserver) {
          closingObserver.next(void 0);
        }
        if (err && err.code) {
          socket.close(err.code, err.reason);
        } else {
          observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));
        }
        this._resetState();
      }, () => {
        const { closingObserver } = this._config;
        if (closingObserver) {
          closingObserver.next(void 0);
        }
        socket.close();
        this._resetState();
      });
      if (queue && queue instanceof ReplaySubject) {
        subscription.add(queue.subscribe(this.destination));
      }
    };
    socket.onerror = (e) => {
      this._resetState();
      observer.error(e);
    };
    socket.onclose = (e) => {
      if (socket === this._socket) {
        this._resetState();
      }
      const { closeObserver } = this._config;
      if (closeObserver) {
        closeObserver.next(e);
      }
      if (e.wasClean) {
        observer.complete();
      } else {
        observer.error(e);
      }
    };
    socket.onmessage = (e) => {
      try {
        const { deserializer } = this._config;
        observer.next(deserializer(e));
      } catch (err) {
        observer.error(err);
      }
    };
  }
  _subscribe(subscriber) {
    const { source } = this;
    if (source) {
      return source.subscribe(subscriber);
    }
    if (!this._socket) {
      this._connectSocket();
    }
    this._output.subscribe(subscriber);
    subscriber.add(() => {
      const { _socket } = this;
      if (this._output.observers.length === 0) {
        if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {
          _socket.close();
        }
        this._resetState();
      }
    });
    return subscriber;
  }
  unsubscribe() {
    const { _socket } = this;
    if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {
      _socket.close();
    }
    this._resetState();
    super.unsubscribe();
  }
};

// src/app/@lcp-framework/pages/import-master/import-master.component.ts
var _c0 = (a0) => ({ "!border-white-light !border-b-white  text-primary dark:!border-[#191e3a] dark:!border-b-black": a0 });
var _c1 = (a0) => ({ "!border-white-light !border-b-white text-primary dark:!border-[#191e3a] dark:!border-b-black": a0 });
var _c2 = () => [];
function ImportMasterComponent_div_1_div_1_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div")(1, "p", 6);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "div", 7);
    \u0275\u0275element(5, "div", 8);
    \u0275\u0275elementEnd()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate2("", \u0275\u0275pipeBind1(3, 4, "processing_data"), ":", ctx_r0.progress, "%");
    \u0275\u0275advance(3);
    \u0275\u0275styleProp("width", ctx_r0.progress + "%");
  }
}
function ImportMasterComponent_div_1_div_2_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275element(0, "div", 9);
  }
}
function ImportMasterComponent_div_1_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 3);
    \u0275\u0275template(1, ImportMasterComponent_div_1_div_1_Template, 6, 6, "div", 4)(2, ImportMasterComponent_div_1_div_2_Template, 1, 0, "div", 5);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.progress && ctx_r0.progress < 100);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", !ctx_r0.progress || ctx_r0.progress >= 100);
  }
}
function ImportMasterComponent_div_2_div_14_option_17_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "option", 38);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const importTemplate_r4 = ctx.$implicit;
    \u0275\u0275property("value", importTemplate_r4.uuid);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", importTemplate_r4.name, " ");
  }
}
function ImportMasterComponent_div_2_div_14_div_53_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 15)(1, "h2", 17);
    \u0275\u0275text(2, "Import Job");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(3, "div", 39)(4, "div", 40)(5, "label", 41);
    \u0275\u0275text(6);
    \u0275\u0275pipe(7, "translate");
    \u0275\u0275elementStart(8, "span", 22);
    \u0275\u0275text(9, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275element(10, "input", 42);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(11, "div", 40)(12, "label", 43);
    \u0275\u0275text(13);
    \u0275\u0275pipe(14, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(15, "textarea", 44);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(16, "div", 40)(17, "label", 45);
    \u0275\u0275text(18);
    \u0275\u0275pipe(19, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275element(20, "input", 46);
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance(6);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(7, 4, "name"), " ");
    \u0275\u0275advance(7);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(14, 6, "description"));
    \u0275\u0275advance(5);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(19, 8, "batch_process_count"));
    \u0275\u0275advance(2);
    \u0275\u0275propertyInterpolate("value", ctx_r0.import_batch_process_count);
  }
}
function ImportMasterComponent_div_2_div_14_Template(rf, ctx) {
  if (rf & 1) {
    const _r3 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div")(1, "h2", 17);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "div", 18)(5, "form", 19);
    \u0275\u0275listener("ngSubmit", function ImportMasterComponent_div_2_div_14_Template_form_ngSubmit_5_listener() {
      \u0275\u0275restoreView(_r3);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.getTemplateDetail());
    });
    \u0275\u0275elementStart(6, "div", 20)(7, "div")(8, "label", 21);
    \u0275\u0275text(9);
    \u0275\u0275pipe(10, "translate");
    \u0275\u0275elementStart(11, "span", 22);
    \u0275\u0275text(12, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(13, "select", 23);
    \u0275\u0275listener("change", function ImportMasterComponent_div_2_div_14_Template_select_change_13_listener() {
      \u0275\u0275restoreView(_r3);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.getIndividualFields());
    });
    \u0275\u0275elementStart(14, "option", 24);
    \u0275\u0275text(15);
    \u0275\u0275pipe(16, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(17, ImportMasterComponent_div_2_div_14_option_17_Template, 2, 2, "option", 25);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(18, "div")(19, "label", 26);
    \u0275\u0275text(20);
    \u0275\u0275pipe(21, "translate");
    \u0275\u0275elementStart(22, "span", 22);
    \u0275\u0275text(23, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(24, "input", 27);
    \u0275\u0275listener("change", function ImportMasterComponent_div_2_div_14_Template_input_change_24_listener($event) {
      \u0275\u0275restoreView(_r3);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.onFileChange($event));
    });
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(25, "div")(26, "label", 28);
    \u0275\u0275text(27);
    \u0275\u0275pipe(28, "translate");
    \u0275\u0275elementStart(29, "span", 22);
    \u0275\u0275text(30, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275element(31, "input", 29);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(32, "div")(33, "label", 30);
    \u0275\u0275text(34);
    \u0275\u0275pipe(35, "translate");
    \u0275\u0275elementStart(36, "span", 22);
    \u0275\u0275text(37, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275element(38, "input", 31);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(39, "div")(40, "label", 32);
    \u0275\u0275text(41);
    \u0275\u0275pipe(42, "translate");
    \u0275\u0275elementStart(43, "span", 22);
    \u0275\u0275text(44, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275element(45, "input", 33);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(46, "div")(47, "label", 34);
    \u0275\u0275text(48);
    \u0275\u0275pipe(49, "translate");
    \u0275\u0275elementStart(50, "span", 22);
    \u0275\u0275text(51, "*");
    \u0275\u0275elementEnd()();
    \u0275\u0275element(52, "input", 35);
    \u0275\u0275elementEnd()();
    \u0275\u0275template(53, ImportMasterComponent_div_2_div_14_div_53_Template, 21, 10, "div", 36);
    \u0275\u0275elementStart(54, "button", 37);
    \u0275\u0275text(55);
    \u0275\u0275pipe(56, "translate");
    \u0275\u0275elementEnd()()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 12, "select_template"));
    \u0275\u0275advance(3);
    \u0275\u0275property("formGroup", ctx_r0.importForm);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(10, 14, "import_template_name"), " ");
    \u0275\u0275advance(6);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(16, 16, "select_import_template"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.importTemplates);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(21, 18, "import_template_file"), " ");
    \u0275\u0275advance(7);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(28, 20, "max_data_row"), " ");
    \u0275\u0275advance(7);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(35, 22, "data_header_row"), " ");
    \u0275\u0275advance(7);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(42, 24, "data_start_row"), " ");
    \u0275\u0275advance(7);
    \u0275\u0275textInterpolate1("", \u0275\u0275pipeBind1(49, 26, "data_end_row"), " ");
    \u0275\u0275advance(5);
    \u0275\u0275property("ngIf", ctx_r0.import_job == "scheduled");
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(56, 28, "next"));
  }
}
function ImportMasterComponent_div_2_div_15_table_6_tr_13_option_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "option", 38);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const fileHeader_r7 = ctx.$implicit;
    \u0275\u0275property("value", fileHeader_r7);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", "{ " + fileHeader_r7 + " }", " ");
  }
}
function ImportMasterComponent_div_2_div_15_table_6_tr_13_li_12_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li", 60);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const filedData_r8 = \u0275\u0275nextContext().$implicit;
    \u0275\u0275advance();
    \u0275\u0275textInterpolate2("", \u0275\u0275pipeBind1(2, 2, "deafult"), ": ", filedData_r8.default_value, "");
  }
}
function ImportMasterComponent_div_2_div_15_table_6_tr_13_li_13_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li", 60);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(2, 1, "required"));
  }
}
function ImportMasterComponent_div_2_div_15_table_6_tr_13_li_14_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li", 60);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(2, 1, "unique"));
  }
}
function ImportMasterComponent_div_2_div_15_table_6_tr_13_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "tr")(1, "td")(2, "label", 56);
    \u0275\u0275text(3);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(4, "td")(5, "select", 57)(6, "option", 24);
    \u0275\u0275text(7);
    \u0275\u0275pipe(8, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(9, ImportMasterComponent_div_2_div_15_table_6_tr_13_option_9_Template, 2, 2, "option", 25);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(10, "td")(11, "ul", 58);
    \u0275\u0275template(12, ImportMasterComponent_div_2_div_15_table_6_tr_13_li_12_Template, 3, 4, "li", 59)(13, ImportMasterComponent_div_2_div_15_table_6_tr_13_li_13_Template, 3, 3, "li", 59)(14, ImportMasterComponent_div_2_div_15_table_6_tr_13_li_14_Template, 3, 3, "li", 59);
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const filedData_r8 = ctx.$implicit;
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance(2);
    \u0275\u0275property("for", filedData_r8.field_table + "." + filedData_r8.field_name);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(filedData_r8.display_name);
    \u0275\u0275advance(2);
    \u0275\u0275property("id", filedData_r8.field_name)("formControlName", filedData_r8.field_table + "-" + filedData_r8.field_name);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(8, 9, "select"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.fileHeaders);
    \u0275\u0275advance(3);
    \u0275\u0275property("ngIf", filedData_r8.default_value);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", !filedData_r8.is_nullable && !filedData_r8.default_value);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", filedData_r8.is_unique);
  }
}
function ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_li_8_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li", 60);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const controlName_r9 = \u0275\u0275nextContext().$implicit;
    const ctx_r0 = \u0275\u0275nextContext(5);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate2(" ", \u0275\u0275pipeBind1(2, 2, "deafult"), ": ", ctx_r0.individual_fields[controlName_r9].default_value, " ");
  }
}
function ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_li_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li", 60);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(2, 1, "required"), " ");
  }
}
function ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_li_10_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li", 60);
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance();
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(2, 1, "unique"));
  }
}
function ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "tr")(1, "td")(2, "label", 56);
    \u0275\u0275text(3);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(4, "td");
    \u0275\u0275element(5, "input", 63);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "td")(7, "ul", 58);
    \u0275\u0275template(8, ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_li_8_Template, 3, 4, "li", 59)(9, ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_li_9_Template, 3, 3, "li", 59)(10, ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_li_10_Template, 3, 3, "li", 59);
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const controlName_r9 = ctx.$implicit;
    const ctx_r0 = \u0275\u0275nextContext(5);
    \u0275\u0275advance(2);
    \u0275\u0275property("for", controlName_r9);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.individual_fields[controlName_r9].display_name || controlName_r9, " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("id", controlName_r9)("formControlName", controlName_r9);
    \u0275\u0275advance(3);
    \u0275\u0275property("ngIf", ctx_r0.individual_fields[controlName_r9] == null ? null : ctx_r0.individual_fields[controlName_r9].default_value);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", !(ctx_r0.individual_fields[controlName_r9] == null ? null : ctx_r0.individual_fields[controlName_r9].is_nullable) && !(ctx_r0.individual_fields[controlName_r9] == null ? null : ctx_r0.individual_fields[controlName_r9].default_value));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.individual_fields[controlName_r9] == null ? null : ctx_r0.individual_fields[controlName_r9].is_unique);
  }
}
function ImportMasterComponent_div_2_div_15_table_6_ng_container_15_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementContainerStart(0, 61);
    \u0275\u0275elementStart(1, "tr")(2, "td", 62);
    \u0275\u0275text(3);
    \u0275\u0275pipe(4, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275template(5, ImportMasterComponent_div_2_div_15_table_6_ng_container_15_tr_5_Template, 11, 7, "tr", 51);
    \u0275\u0275elementContainerEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(4, 2, "individual_fields"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngForOf", ctx_r0.individualFieldsControlNames);
  }
}
function ImportMasterComponent_div_2_div_15_table_6_Template(rf, ctx) {
  if (rf & 1) {
    const _r6 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "table", 49)(1, "thead")(2, "tr")(3, "th", 50);
    \u0275\u0275text(4);
    \u0275\u0275pipe(5, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "th", 50);
    \u0275\u0275text(7);
    \u0275\u0275pipe(8, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(9, "th");
    \u0275\u0275text(10);
    \u0275\u0275pipe(11, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(12, "tbody");
    \u0275\u0275template(13, ImportMasterComponent_div_2_div_15_table_6_tr_13_Template, 15, 11, "tr", 51);
    \u0275\u0275pipe(14, "orderBy");
    \u0275\u0275template(15, ImportMasterComponent_div_2_div_15_table_6_ng_container_15_Template, 6, 4, "ng-container", 52);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(16, "tfoot")(17, "tr")(18, "td", 53)(19, "div", 54)(20, "button", 55);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_div_15_table_6_Template_button_click_20_listener() {
      \u0275\u0275restoreView(_r6);
      const ctx_r0 = \u0275\u0275nextContext(3);
      return \u0275\u0275resetView(ctx_r0.section = "section1");
    });
    \u0275\u0275text(21);
    \u0275\u0275pipe(22, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(23, "button", 37);
    \u0275\u0275text(24);
    \u0275\u0275pipe(25, "translate");
    \u0275\u0275elementEnd()()()()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(5, 7, "form_fields"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(8, 9, "file_columns"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(11, 11, "field_info"));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngForOf", \u0275\u0275pipeBind2(14, 13, ctx_r0.selectedTemplate.importable_fields, "order_no"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", ctx_r0.fieldsForm.get("individual_fields"));
    \u0275\u0275advance(6);
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(22, 16, "back"), " ");
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(25, 18, "next"));
  }
}
function ImportMasterComponent_div_2_div_15_Template(rf, ctx) {
  if (rf & 1) {
    const _r5 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div")(1, "h2", 17);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "div", 47)(5, "form", 19);
    \u0275\u0275listener("ngSubmit", function ImportMasterComponent_div_2_div_15_Template_form_ngSubmit_5_listener() {
      \u0275\u0275restoreView(_r5);
      const ctx_r0 = \u0275\u0275nextContext(2);
      return \u0275\u0275resetView(ctx_r0.getValidationData());
    });
    \u0275\u0275template(6, ImportMasterComponent_div_2_div_15_table_6_Template, 26, 20, "table", 48);
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 3, "select_columns"));
    \u0275\u0275advance(3);
    \u0275\u0275property("formGroup", ctx_r0.fieldsForm);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.selectedTemplate);
  }
}
function ImportMasterComponent_div_2_div_16_div_1_tr_20_span_3_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "span", 22);
    \u0275\u0275text(1, "*");
    \u0275\u0275elementEnd();
  }
}
function ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_7_li_1_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li");
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const error_r10 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", error_r10.message, " ");
  }
}
function ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_7_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "ul", 74);
    \u0275\u0275template(1, ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_7_li_1_Template, 2, 1, "li", 51);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const fieldKey_r11 = \u0275\u0275nextContext().$implicit;
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance();
    \u0275\u0275property("ngForOf", ctx_r0.sheet_data.ind_row_datas.errors[fieldKey_r11]);
  }
}
function ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_9_li_1_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "li");
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const warning_r12 = ctx.$implicit;
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", warning_r12.message, " ");
  }
}
function ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_9_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "ul", 75);
    \u0275\u0275template(1, ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_9_li_1_Template, 2, 1, "li", 51);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const fieldKey_r11 = \u0275\u0275nextContext().$implicit;
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance();
    \u0275\u0275property("ngForOf", ctx_r0.sheet_data.ind_row_datas.warnings[fieldKey_r11]);
  }
}
function ImportMasterComponent_div_2_div_16_div_1_tr_20_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "tr")(1, "td", 69);
    \u0275\u0275text(2);
    \u0275\u0275template(3, ImportMasterComponent_div_2_div_16_div_1_tr_20_span_3_Template, 2, 0, "span", 70);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "td", 71);
    \u0275\u0275text(5);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(6, "td", 71);
    \u0275\u0275template(7, ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_7_Template, 2, 1, "ul", 72);
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(8, "td", 71);
    \u0275\u0275template(9, ImportMasterComponent_div_2_div_16_div_1_tr_20_ul_9_Template, 2, 1, "ul", 73);
    \u0275\u0275elementEnd()();
  }
  if (rf & 2) {
    const fieldKey_r11 = ctx.$implicit;
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate1(" ", ctx_r0.sheet_data.individual_header_details[fieldKey_r11].display_name || fieldKey_r11, " ");
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", !(ctx_r0.sheet_data.individual_header_details[fieldKey_r11] == null ? null : ctx_r0.sheet_data.individual_header_details[fieldKey_r11].is_nullable));
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate1(" ", ctx_r0.sheet_data.ind_row_datas.columns[fieldKey_r11] || "N/A", " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", (ctx_r0.sheet_data.ind_row_datas.errors[fieldKey_r11] == null ? null : ctx_r0.sheet_data.ind_row_datas.errors[fieldKey_r11].length) || 0 > 0);
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", (ctx_r0.sheet_data.ind_row_datas.warnings[fieldKey_r11] == null ? null : ctx_r0.sheet_data.ind_row_datas.warnings[fieldKey_r11].length) || 0 > 0);
  }
}
function ImportMasterComponent_div_2_div_16_div_1_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 66)(1, "h2", 17);
    \u0275\u0275text(2);
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(4, "table", 67)(5, "thead")(6, "tr")(7, "th", 68);
    \u0275\u0275text(8);
    \u0275\u0275pipe(9, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(10, "th", 68);
    \u0275\u0275text(11);
    \u0275\u0275pipe(12, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(13, "th", 68);
    \u0275\u0275text(14);
    \u0275\u0275pipe(15, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(16, "th", 68);
    \u0275\u0275text(17);
    \u0275\u0275pipe(18, "translate");
    \u0275\u0275elementEnd()()();
    \u0275\u0275elementStart(19, "tbody");
    \u0275\u0275template(20, ImportMasterComponent_div_2_div_16_div_1_tr_20_Template, 10, 5, "tr", 51);
    \u0275\u0275elementEnd()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance(2);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 6, "individual_fields_data"));
    \u0275\u0275advance(6);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(9, 8, "field"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(12, 10, "value"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(15, 12, "errors"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(18, 14, "warnings"));
    \u0275\u0275advance(3);
    \u0275\u0275property("ngForOf", ctx_r0.getIndividualFieldKeys());
  }
}
function ImportMasterComponent_div_2_div_16_div_2_div_35_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 94);
    \u0275\u0275text(1);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", ctx_r0.sheet_data.error_msg, " ");
  }
}
function ImportMasterComponent_div_2_div_16_div_2_button_41_Template(rf, ctx) {
  if (rf & 1) {
    const _r14 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 91);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_div_16_div_2_button_41_Template_button_click_0_listener() {
      \u0275\u0275restoreView(_r14);
      const ctx_r0 = \u0275\u0275nextContext(4);
      return \u0275\u0275resetView(ctx_r0.importTemplateDetail());
    });
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(2, 1, "import"), " ");
  }
}
function ImportMasterComponent_div_2_div_16_div_2_button_42_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "button", 95);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_div_16_div_2_button_42_Template_button_click_0_listener() {
      \u0275\u0275restoreView(_r15);
      const ctx_r0 = \u0275\u0275nextContext(4);
      return \u0275\u0275resetView(ctx_r0.importValidRecords());
    });
    \u0275\u0275text(1);
    \u0275\u0275pipe(2, "translate");
    \u0275\u0275pipe(3, "translate");
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(4);
    \u0275\u0275advance();
    \u0275\u0275textInterpolate3(" ", \u0275\u0275pipeBind1(2, 3, "ignore_errors_and_import"), " ", (ctx_r0.sheet_data.row_datas.length || 0) - ctx_r0.getErrorCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(7, _c2)), " ", \u0275\u0275pipeBind1(3, 5, "rows"), " ");
  }
}
function ImportMasterComponent_div_2_div_16_div_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r13 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div", 47)(1, "div", 76)(2, "div", 77)(3, "h2", 78);
    \u0275\u0275text(4);
    \u0275\u0275pipe(5, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(6, "div", 77)(7, "div", 79);
    \u0275\u0275element(8, "span", 80);
    \u0275\u0275elementStart(9, "span", 81);
    \u0275\u0275text(10);
    \u0275\u0275pipe(11, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(12, "span", 82);
    \u0275\u0275text(13);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(14, "div", 79);
    \u0275\u0275element(15, "span", 83);
    \u0275\u0275elementStart(16, "span", 84);
    \u0275\u0275text(17);
    \u0275\u0275pipe(18, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(19, "span", 82);
    \u0275\u0275text(20);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(21, "div", 79);
    \u0275\u0275element(22, "span", 85);
    \u0275\u0275elementStart(23, "span", 86);
    \u0275\u0275text(24);
    \u0275\u0275pipe(25, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(26, "span", 82);
    \u0275\u0275text(27);
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(28, "div", 79);
    \u0275\u0275element(29, "span", 87);
    \u0275\u0275elementStart(30, "span", 88);
    \u0275\u0275text(31);
    \u0275\u0275pipe(32, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(33, "span", 82);
    \u0275\u0275text(34);
    \u0275\u0275elementEnd()()()();
    \u0275\u0275template(35, ImportMasterComponent_div_2_div_16_div_2_div_35_Template, 2, 1, "div", 89);
    \u0275\u0275element(36, "app-client-datatable", 90);
    \u0275\u0275elementStart(37, "div", 54)(38, "button", 91);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_div_16_div_2_Template_button_click_38_listener() {
      \u0275\u0275restoreView(_r13);
      const ctx_r0 = \u0275\u0275nextContext(3);
      return \u0275\u0275resetView(ctx_r0.section = "section2");
    });
    \u0275\u0275text(39);
    \u0275\u0275pipe(40, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275template(41, ImportMasterComponent_div_2_div_16_div_2_button_41_Template, 3, 3, "button", 92)(42, ImportMasterComponent_div_2_div_16_div_2_button_42_Template, 4, 8, "button", 93);
    \u0275\u0275elementEnd()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(3);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(5, 15, "validated_records"));
    \u0275\u0275advance(6);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(11, 17, "total_rows:"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate((ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(27, _c2)).length);
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(18, 19, "errors_rows:"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(ctx_r0.getErrorCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(28, _c2)));
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(25, 21, "valid_rows:"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(ctx_r0.getValidCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(29, _c2)));
    \u0275\u0275advance(4);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(32, 23, "warnings_rows:"));
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(ctx_r0.getWarningCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(30, _c2)));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.sheet_data == null ? null : ctx_r0.sheet_data.error_msg);
    \u0275\u0275advance();
    \u0275\u0275property("data", ctx_r0.getSheetDatas())("config", ctx_r0.getSheetHeader());
    \u0275\u0275advance(3);
    \u0275\u0275textInterpolate(\u0275\u0275pipeBind1(40, 25, "back"));
    \u0275\u0275advance(2);
    \u0275\u0275property("ngIf", !(ctx_r0.selectedTemplate == null ? null : ctx_r0.selectedTemplate.ignore_error_rows) || ctx_r0.getErrorCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(31, _c2)) == 0 || ctx_r0.getErrorCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(32, _c2)) === (ctx_r0.sheet_data.row_datas.length || 0));
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", (ctx_r0.selectedTemplate == null ? null : ctx_r0.selectedTemplate.ignore_error_rows) && ctx_r0.getErrorCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(33, _c2)) > 0 && ctx_r0.getErrorCount(ctx_r0.sheet_data.row_datas || \u0275\u0275pureFunction0(34, _c2)) !== (ctx_r0.sheet_data.row_datas.length || 0));
  }
}
function ImportMasterComponent_div_2_div_16_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div");
    \u0275\u0275template(1, ImportMasterComponent_div_2_div_16_div_1_Template, 21, 16, "div", 64)(2, ImportMasterComponent_div_2_div_16_div_2_Template, 43, 35, "div", 65);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext(2);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.sheet_data && ctx_r0.sheet_data.ind_row_datas && ctx_r0.getIndividualFieldKeys().length);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.sheet_data && ctx_r0.sheet_data.header_details);
  }
}
function ImportMasterComponent_div_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r2 = \u0275\u0275getCurrentView();
    \u0275\u0275elementStart(0, "div", 10)(1, "div", 11)(2, "div", 12)(3, "div", 13)(4, "a", 14);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_Template_a_click_4_listener() {
      \u0275\u0275restoreView(_r2);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.section = "section1");
    });
    \u0275\u0275text(5);
    \u0275\u0275pipe(6, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(7, "a", 14);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_Template_a_click_7_listener() {
      \u0275\u0275restoreView(_r2);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.section = "section2");
    });
    \u0275\u0275text(8);
    \u0275\u0275pipe(9, "translate");
    \u0275\u0275elementEnd();
    \u0275\u0275elementStart(10, "a", 14);
    \u0275\u0275listener("click", function ImportMasterComponent_div_2_Template_a_click_10_listener() {
      \u0275\u0275restoreView(_r2);
      const ctx_r0 = \u0275\u0275nextContext();
      return \u0275\u0275resetView(ctx_r0.section = "section3");
    });
    \u0275\u0275text(11);
    \u0275\u0275pipe(12, "translate");
    \u0275\u0275elementEnd()();
    \u0275\u0275elementStart(13, "div", 15);
    \u0275\u0275template(14, ImportMasterComponent_div_2_div_14_Template, 57, 30, "div", 16)(15, ImportMasterComponent_div_2_div_15_Template, 7, 5, "div", 16)(16, ImportMasterComponent_div_2_div_16_Template, 3, 2, "div", 16);
    \u0275\u0275elementEnd()()()();
  }
  if (rf & 2) {
    const ctx_r0 = \u0275\u0275nextContext();
    \u0275\u0275advance(4);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(15, _c0, ctx_r0.section.toLowerCase() === "section1"));
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(6, 9, "step_1"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(17, _c1, ctx_r0.section.toLowerCase() === "section2"));
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(9, 11, "step_2"), " ");
    \u0275\u0275advance(2);
    \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(19, _c1, ctx_r0.section.toLowerCase() === "section3"));
    \u0275\u0275advance();
    \u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(12, 13, "step_3"), " ");
    \u0275\u0275advance(3);
    \u0275\u0275property("ngIf", ctx_r0.section.toLowerCase() === "section1");
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.section.toLowerCase() === "section2");
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx_r0.section.toLowerCase() === "section3");
  }
}
var _ImportMasterComponent = class _ImportMasterComponent {
  constructor(translate, toastr, gridApiService, router, localstore, fb) {
    this.translate = translate;
    this.toastr = toastr;
    this.gridApiService = gridApiService;
    this.router = router;
    this.localstore = localstore;
    this.fb = fb;
    this.import_job = "direct";
    this.import_batch_process_count = 50;
    this.fieldsForm = this.fb.group({});
    this.section = "section1";
    this.importTemplates = [];
    this.selectedTemplate = null;
    this.file = null;
    this.fileHeaders = [];
    this.fileUploadLog = null;
    this.sheet_data = null;
    this.individual_fields = {};
    this.submitted = false;
    this.isLoading = false;
    this.isSendMail = false;
    this.progress = 100;
    this.tableConfig = {
      pageSizes: [5, 10, 25, 50],
      defaultPageSize: 10,
      searchable: true
    };
    this.userData = JSON.parse(this.localstore.getData("user_data"));
    this.importForm = this.fb.group({
      import_template: ["", Validators.required],
      import_template_file: ["", Validators.required],
      data_header_row: [1, [Validators.required, Validators.min(1)]],
      // Minimum value 1
      data_start_row: [0, [Validators.min(0)]],
      // Minimum value 0
      data_end_row: [0, [Validators.min(0)]],
      // Minimum value 0
      max_data_row: [{ value: 500, disabled: true }],
      name: ["", Validators.required],
      description: [""]
      // individual_fields: this.fb.group({}),
    });
  }
  ngOnInit() {
    this.resetComponent();
    this.getImportTemplates();
    if (this.userData?.main?.user_id) {
      const socketUrl = "wss://opensource.techcedence.net:8090";
      this.socket$ = new WebSocketSubject(`${socketUrl}?userId=${this.userData.main.user_id}`);
      this.socket$.subscribe((data) => {
        this.progress = data.progress;
      });
    }
  }
  resetComponent(uuid = "") {
    this.deleteUploadedSheet();
    this.importForm.reset({
      import_template: uuid,
      import_template_file: "",
      data_header_row: 1,
      data_start_row: 0,
      data_end_row: 0,
      max_data_row: 500,
      name: "",
      description: ""
      // individual_fields: this.fb.group({}),
    });
    this.fieldsForm = this.fb.group({});
    this.section = "section1";
    this.individual_fields = {};
    this.selectedTemplate = null;
    this.file = null;
    this.fileHeaders = [];
    this.fileUploadLog = null;
    this.sheet_data = null;
  }
  getImportTemplates() {
    let search_all = [{ column_name: "import_templates.status_id", operator: "=", value: "1" }];
    if (this.userData || this.userData?.main?.role !== "super_admin") {
      search_all.push({ column_name: "import_templates.is_admin_module", operator: "=", value: "false" });
    }
    const impTemParam = {
      primary_table: "import_templates",
      sort_columns: [["import_templates.name", "asc"]],
      limit_range: 1e3,
      select_columns: [
        ["import_templates.id"],
        ["import_templates.name"],
        ["import_templates.slug"],
        ["import_templates.uuid"],
        ["import_templates.job_type"],
        ["import_templates.batch_process_count"]
      ],
      company_id: 1,
      search_all
    };
    this.gridApiService.getListData(impTemParam).subscribe((response) => {
      if (response.status && response.data?.records.length) {
        this.importTemplates = response.data.records;
        console.log(this.importTemplates);
      } else if (!response.status) {
        this.importTemplates = [];
        this.toastr.error(`Code: ${response.code} , ${response.message}`);
      }
    }, (error) => {
      this.importTemplates = [];
      this.toastr.error("Error getting ImportTemplateDetail");
    });
  }
  onFileChange(event) {
    const input = event.target;
    if (!input.files?.length) {
      return;
    }
    this.file = input.files[0];
    this.importForm.patchValue({ import_template_file: this.file });
  }
  getTemplateDetail() {
    this.submitted = true;
    if (this.importForm.invalid) {
      if (this.importForm.controls["import_template"].hasError("required")) {
        this.toastr.error("please_select_import_template_before_continuing");
      } else if (this.importForm.controls["import_template_file"].hasError("required")) {
        this.toastr.error("please_select_a_import_template_file_before_continuing");
      }
      return;
    }
    if (this.file) {
      this.isLoading = true;
      const formData = new FormData();
      formData.append("excel_file", this.file);
      formData.append("uuid", this.importForm.get("import_template")?.value);
      formData.append("data_header_row", this.importForm.get("data_header_row")?.value);
      formData.append("data_start_row", this.importForm.get("data_start_row")?.value);
      formData.append("data_end_row", this.importForm.get("data_end_row")?.value);
      formData.append("max_data_row", this.importForm.get("max_data_row")?.value);
      this.gridApiService.getImportTemplateDetail(formData).subscribe((response) => {
        if (response.status) {
          this.deleteUploadedSheet();
          this.selectedTemplate = response.data.selectedTemplate;
          this.fileHeaders = response.data.fileHeaders;
          if (this.selectedTemplate)
            this.createFieldsForm(this.selectedTemplate.importable_fields);
          this.fileUploadLog = response.data.fileUploadLog;
          this.section = "section2";
          this.isLoading = false;
        } else {
          this.toastr.error(response.message);
          this.isLoading = false;
        }
      }, (error) => {
        this.toastr.error("Error getting import template detail");
        this.isLoading = false;
      });
    }
  }
  getValidators(field) {
    const validators = [Validators.pattern("^[A-Z]{1,2}(?:[1-9][0-9]{0,4}|100000)$")];
    if (!field.is_nullable && !field.default_value) {
      validators.push(Validators.required);
    }
    return validators;
  }
  createFieldsForm(fieldOptions) {
    const group = {};
    fieldOptions.forEach((fieldOption) => {
      const defaultValue = this.fileHeaders.includes(fieldOption.display_name) ? fieldOption.display_name : "";
      const controlName = `${fieldOption.field_table}-${fieldOption.field_name}`;
      group[controlName] = fieldOption.default_value || fieldOption.is_nullable ? [defaultValue] : [defaultValue, Validators.required];
    });
    if (this.individual_fields && Object.keys(this.individual_fields).length > 0) {
      const individualFieldsGroup = {};
      Object.keys(this.individual_fields).forEach((controlName) => {
        const field = this.individual_fields[controlName];
        individualFieldsGroup[controlName] = new FormControl(field.individual_column || "", this.getValidators(field));
      });
      group[`individual_fields`] = this.fb.group(individualFieldsGroup);
    }
    this.fieldsForm = this.fb.group(group);
  }
  getValidationData() {
    if (this.fieldsForm.invalid) {
      this.toastr.error("Please make sure all the fields are valid.");
      return;
    }
    const bodyParams = __spreadProps(__spreadValues({}, this.fieldsForm.value), {
      data_header_row: this.importForm.get("data_header_row")?.value,
      data_start_row: this.importForm.get("data_start_row")?.value,
      data_end_row: this.importForm.get("data_end_row")?.value,
      max_data_row: this.importForm.get("max_data_row")?.value
    });
    const emptyFields = Object.entries(this.fieldsForm.value).filter(([key, value]) => value === "");
    if (emptyFields.length > 0) {
      import_sweetalert2.default.fire({
        icon: "warning",
        title: "Are you sure?",
        text: `There are ${emptyFields.length} unmapped fieldes. Are you sure you want to continue?`,
        showCancelButton: true,
        confirmButtonText: "Confirm",
        padding: "2em"
      }).then((result) => __async(this, null, function* () {
        if (result.value) {
          this.getImportTemplateData(bodyParams);
        }
      }));
    } else {
      this.getImportTemplateData(bodyParams);
    }
  }
  getImportTemplateData(bodyParams) {
    if (!this.selectedTemplate || !this.fileUploadLog) {
      this.toastr.error("session_expired_please_try_again");
      this.resetComponent();
      return;
    }
    this.isLoading = true;
    this.gridApiService.getImportTemplateData(bodyParams, this.selectedTemplate?.uuid, this.fileUploadLog?.uuid).subscribe((response) => {
      if (response.status) {
        this.section = "section3";
        this.sheet_data = response.data;
        this.isLoading = false;
      } else {
        this.toastr.error(response.message);
        this.isLoading = false;
      }
    }, (error) => {
      this.toastr.error("Error getting import template data");
      this.isLoading = false;
    });
  }
  getErrorCount(rowDatas = []) {
    return rowDatas.filter((row) => row.error === true).length;
  }
  getWarningCount(rowDatas = []) {
    return rowDatas.filter((row) => row.warning === true && row.error === false).length;
  }
  getValidCount(rowDatas = []) {
    return rowDatas.filter((row) => row.error === false && row.warning === false).length;
  }
  canDeactivate() {
    if (this.fileUploadLog && this.fileUploadLog.uuid)
      return confirm("Are you sure you want to leave this page befor importing?");
    else
      return true;
  }
  // Component cleanup logic in ngOnDestroy
  ngOnDestroy() {
    this.deleteUploadedSheet();
    this.socket$.complete();
  }
  deleteUploadedSheet() {
    if (this.fileUploadLog && this.fileUploadLog.uuid) {
      this.gridApiService.deleteFileByUuid(this.fileUploadLog?.uuid).subscribe((response) => {
      }, (error) => {
        const key = "error";
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
      });
    }
  }
  getSheetDatas() {
    const data = this.sheet_data?.row_datas.map((row) => {
      const errorMessages = Object.values(row.errors).flat().map((error) => error.message).join(",, ");
      const warnMessages = Object.values(row.warnings).flat().map((warning) => warning.message).join(",, ");
      const status = row.warning ? '<span class="badge text-xs badge-outline-warning">warning</span>' : '<span class="badge text-xs badge-outline-success">valid</span>';
      const errorstatus = row.error ? `<span class="badge text-xs badge-outline-danger">invalid</span>` : status;
      return __spreadProps(__spreadValues({}, row.columns), {
        errors: row.errors,
        warnings: row.warnings,
        errorstatus,
        // Add error status
        errorMessages: row.error ? errorMessages : warnMessages
        // Add combined error messages
      });
    });
    return data;
  }
  getSheetDatasForScheduled() {
    return this.sheet_data?.row_datas.map((row) => {
      return __spreadValues({}, row.columns);
    });
  }
  getSheetHeader() {
    const headers = this.sheet_data?.header_details;
    const columns = Object.entries(headers).sort(([, a], [, b]) => a.order_no - b.order_no).map(([key, header]) => ({
      key,
      // headers key
      label: `${header.display_name}${header.is_nullable ? "" : ' <span class="text-danger">*</span>'}`,
      sortable: true,
      // assuming all columns are sortable; adjust if needed
      searchable: true,
      isHtmlHeader: true
    }));
    const additionalColumns = [
      { key: "errorstatus", label: "Status", sortable: true, isHtmlValue: true },
      { key: "errorMessages", label: "Messages", sortable: false, isHtmlValue: true }
    ];
    const updatedColumns = [...additionalColumns, ...columns];
    return __spreadProps(__spreadValues({}, this.tableConfig), { columns: updatedColumns, detailStatusPopup: true });
  }
  getSheetHeaderForScheduled() {
    const headers = this.sheet_data?.header_details;
    const columns = Object.entries(headers).sort(([, a], [, b]) => a.order_no - b.order_no).map(([key, header]) => ({
      key,
      // headers key
      label: `${header.display_name}${header.is_nullable ? "" : ' <span class="text-danger">*</span>'}`,
      sortable: true,
      // assuming all columns are sortable; adjust if needed
      searchable: true,
      isHtmlHeader: true
    }));
    const updatedColumns = [...columns];
    return __spreadProps(__spreadValues({}, this.tableConfig), { columns: updatedColumns });
  }
  importTemplateDetail() {
    this.isLoading = true;
    const sheet_data = this.sheet_data;
    const isInValid = sheet_data.row_datas?.some((row) => row.error === true);
    const isInValidInd = sheet_data.ind_row_datas?.error;
    if (!sheet_data?.row_datas?.length || isInValid || isInValidInd) {
      this.toastr.error("Invalid sheet data please fix the errors befor continue.");
      this.isLoading = false;
    } else {
      if (sheet_data.error_msg) {
        import_sweetalert2.default.fire({
          icon: "warning",
          title: "Are you sure?",
          text: sheet_data.error_msg,
          showCancelButton: true,
          confirmButtonText: "Confirm",
          padding: "2em"
        }).then((result) => __async(this, null, function* () {
          if (result.value) {
            this.uploadExcelAndcallImport(sheet_data);
          } else {
            this.isLoading = false;
          }
        }));
      } else {
        this.uploadExcelAndcallImport(sheet_data);
      }
    }
  }
  importValidRecords() {
    let sheet_data = this.sheet_data;
    const onlyValidRowDatas = sheet_data.row_datas?.filter((row) => row.error !== true);
    const isInValidInd = sheet_data.ind_row_datas?.error;
    if (isInValidInd) {
      this.toastr.error("Please fix the Individual fields errors befor continue.");
    } else if (!onlyValidRowDatas.length) {
      this.toastr.error("There are no valid rows available to import.");
    } else {
      import_sweetalert2.default.fire({
        icon: "warning",
        title: "Are you sure?",
        text: `${this.getErrorCount(this.sheet_data?.row_datas || [])} error rows will be ignored, and ${onlyValidRowDatas.length} rows will be imported out of a total of ${this.sheet_data?.row_datas?.length || 0} records.`,
        showCancelButton: true,
        confirmButtonText: "Confirm",
        padding: "2em"
      }).then((result) => __async(this, null, function* () {
        if (result.value) {
          sheet_data = __spreadProps(__spreadValues({}, sheet_data), { row_datas: onlyValidRowDatas });
          this.uploadExcelAndcallImport(sheet_data);
        }
      }));
    }
  }
  processScheduledInsertion(sheet_data) {
    if (this.importForm.invalid) {
      this.toastr.error("Please fill the import job form");
      return;
    }
    console.log(sheet_data);
    let finalData = sheet_data;
    let finalRows = [];
    finalData.row_datas.forEach((item) => {
      item.errors = {};
      item.warnings = {};
      finalRows.push({
        import_job_id: "@table1.id",
        row_object: item
      });
    });
    console.log(finalRows);
    console.log(finalData);
    const randomValue = Math.floor(Math.random() * 1e5);
    const wholeData = this.getSheetDatas();
    const wholeDataConfig = this.getSheetHeader();
    const rowObjectString = JSON.stringify(wholeData);
    const rowObjectConfigString = JSON.stringify(wholeDataConfig);
    const payload = {
      action: ["insert", "insert"],
      table: ["import_jobs", "import_job_line_items"],
      table_mapping: ["table1", "table2"],
      data: {
        table1: [
          {
            name: this.importForm.get("name")?.value,
            description: this.importForm.get("description")?.value,
            sequence_number: `{{{get_sequence_no('import_job', true)}}}`,
            total_rows: wholeData.length,
            completed_rows: 0,
            error_rows: 0,
            batch_process_count: this.import_batch_process_count,
            file_path: sheet_data.attachments_path,
            file_name: sheet_data.attachments_name,
            created_by: this.userData.main.user_id,
            header_details: {
              selectedTemplate: this.selectedTemplate?.uuid,
              fileUploadLog: this.fileUploadLog?.uuid,
              individual_header_details: finalData.individual_header_details,
              ind_row_datas: finalData.ind_row_datas,
              header_details: finalData.header_details,
              error_msg: finalData.error_msg
            },
            table_config: rowObjectConfigString
          }
        ],
        table2: finalRows
      }
    };
    console.log(payload);
    this.gridApiService.executeRecords(payload).subscribe((response) => {
      if (response.status && response.code === 200) {
        console.log(response);
        if (response.status) {
          this.resetComponent();
          this.getImportTemplates();
          this.submitted = false;
          this.toastr.success(response.message);
          this.isLoading = false;
        } else {
          this.toastr.error(response.message);
          this.isLoading = false;
        }
      } else {
        const key = response.message;
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
        this.isLoading = false;
      }
    }, (error) => {
      const key = "error";
      const errorMessage = this.translate.instant(key);
      this.toastr.error(errorMessage, "Error");
      this.isLoading = false;
    });
  }
  uploadExcelAndcallImport(sheet_data) {
    return __async(this, null, function* () {
      if (this.isSendMail) {
        const formData = new FormData();
        formData.append("image", this.importForm.controls["import_template_file"].value, this.importForm.controls["import_template_file"].value?.name);
        this.gridApiService.uploadImageAndGetName(formData).subscribe((response) => {
          if (response.body && response.body.status) {
            sheet_data.attachments_path = response.body.data[0].docName;
            sheet_data.attachments_name = response.body.data[0].orgName;
            this.callImportApi(sheet_data);
          }
        });
      } else {
        this.callImportApi(sheet_data);
      }
    });
  }
  callImportApi(sheet_data) {
    if (this.import_job == "scheduled") {
      this.processScheduledInsertion(sheet_data);
    } else {
      let payload = {
        row_datas: sheet_data.row_datas,
        ind_row_datas: sheet_data.ind_row_datas
      };
      if (sheet_data.attachments_name) {
        payload.attachments_name = sheet_data.attachments_name;
        payload.attachments_path = sheet_data.attachments_path;
      }
      this.gridApiService.importTemplateDetail(this.selectedTemplate?.uuid, this.fileUploadLog?.uuid, payload).subscribe((response) => {
        if (response.status) {
          this.resetComponent();
          this.getImportTemplates();
          this.submitted = false;
          this.toastr.success(response.message);
          this.isLoading = false;
        } else {
          this.toastr.error(response.message);
          this.isLoading = false;
        }
      }, (error) => {
        const key = "error";
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
        this.isLoading = false;
      });
    }
  }
  getIndividualHeader(headers) {
    const sortedData = headers.sort((a, b) => a.order_no - b.order_no);
    const result = {};
    sortedData.forEach((item) => {
      const key = `${item.field_table}-${item.field_name}`;
      result[key] = item;
    });
    return result;
  }
  getIndividualFields() {
    const uuid = this.importForm.get("import_template")?.value;
    if (uuid) {
      this.gridApiService.getIndividualImportFields(uuid).subscribe((response) => {
        if (response.status && response.data.records.length) {
          console.log(response.data.records);
          this.resetComponent(uuid);
          if (response.data.records[0].importable_fields) {
            this.individual_fields = this.getIndividualHeader(response.data.records[0].importable_fields);
          }
          this.import_job = response.data.records[0].job_type;
          this.isSendMail = response.data.records[0].is_send_mail;
          this.import_batch_process_count = response.data.records[0].batch_process_count;
          this.importForm.patchValue({
            data_header_row: response.data.records[0].header_row,
            data_start_row: response.data.records[0].data_start_row,
            data_end_row: response.data.records[0].data_end_row,
            max_data_row: response.data.records[0].max_row_count
          });
          if (this.import_job === "scheduled") {
            this.importForm.get("name")?.setValidators([Validators.required]);
          } else {
            this.importForm.get("name")?.clearValidators();
          }
          this.importForm.get("name")?.updateValueAndValidity();
        } else {
          this.resetComponent(uuid);
        }
      }, (error) => {
        const key = "error";
        const errorMessage = this.translate.instant(key);
        this.toastr.error(errorMessage, "Error");
      });
    }
  }
  get individualFieldsControlNames() {
    return Object.keys(this.fieldsForm.get("individual_fields")?.controls || {});
  }
  getIndividualFieldKeys() {
    return this.sheet_data ? Object.keys(this.sheet_data.ind_row_datas.columns) : [];
  }
};
_ImportMasterComponent.\u0275fac = function ImportMasterComponent_Factory(t) {
  return new (t || _ImportMasterComponent)(\u0275\u0275directiveInject(TranslateService), \u0275\u0275directiveInject(ToastrService), \u0275\u0275directiveInject(GridApiService), \u0275\u0275directiveInject(Router), \u0275\u0275directiveInject(LocalStorageService), \u0275\u0275directiveInject(FormBuilder));
};
_ImportMasterComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _ImportMasterComponent, selectors: [["app-import-master"]], standalone: true, features: [\u0275\u0275StandaloneFeature], decls: 3, vars: 2, consts: [[1, "space-y-8"], ["class", "loader-overlay", 4, "ngIf"], ["class", "grid grid-cols-1 gap-6 lg:grid-cols-1", 4, "ngIf"], [1, "loader-overlay"], [4, "ngIfSpinner", "ngIf"], ["class", "spinner", 4, "ngIf"], [1, "mb-2", "text-lg", "font-semibold"], [1, "h-6", "w-full", "rounded-full", "bg-gray-200"], [1, "h-6", "rounded-full", "bg-blue-500"], [1, "spinner"], [1, "grid", "grid-cols-1", "gap-6", "lg:grid-cols-1"], [1, "panel"], [1, "mb-5"], [1, "mt-3", "flex", "flex-wrap", "border-b", "border-white-light", "dark:border-[#191e3a]"], ["href", "javascript:;", 1, "-mb-[1px]", "block", "border", "border-transparent", "p-3.5", "py-2", "!outline-none", "transition", "duration-300", "hover:text-primary", "dark:hover:border-b-black", 3, "click", "ngClass"], [1, "flex-1", "pt-5", "text-sm"], [4, "ngIf"], [1, "mb-4", "text-lg", "font-bold"], [1, "mb-4"], [3, "ngSubmit", "formGroup"], [1, "grid", "grid-cols-1", "gap-4", "sm:grid-cols-3"], ["for", "import_template"], [1, "text-danger"], ["id", "import_template", "formControlName", "import_template", "required", "", 1, "form-select", "text-white-dark", 3, "change"], ["value", ""], [3, "value", 4, "ngFor", "ngForOf"], ["for", "import_template_file"], ["id", "import_template_file", "type", "file", "required", "", "accept", ".xlsx", 1, "rtl:file-ml-5", "form-input", "p-0", "file:border-0", "file:bg-primary/90", "file:px-4", "file:py-2", "file:font-semibold", "file:text-white", "file:hover:bg-primary", "ltr:file:mr-5", 3, "change"], ["for", "max_data_row"], ["min", "1", "id", "max_data_row", "type", "text", "formControlName", "max_data_row", "readonly", "", 1, "form-input", "text-white-dark"], ["for", "data_header_row"], ["min", "1", "id", "data_header_row", "type", "number", "formControlName", "data_header_row", "required", "", 1, "form-input", "text-white-dark"], ["for", "data_start_row"], ["min", "0", "id", "data_start_row", "type", "number", "formControlName", "data_start_row", 1, "form-input", "text-white-dark"], ["for", "data_end_row"], ["min", "0", "id", "data_end_row", "type", "number", "formControlName", "data_end_row", 1, "form-input", "text-white-dark"], ["class", "flex-1 pt-5 text-sm", 4, "ngIf"], ["type", "submit", 1, "btn", "btn-primary", "!mt-6"], [3, "value"], [1, "grid", "grid-cols-1", "gap-6", "p-4", "sm:grid-cols-2", "md:grid-cols-3", "lg:grid-cols-4"], [1, "flex", "flex-col"], ["for", "name"], ["id", "name", "type", "text", "formControlName", "name", 1, "form-input", "text-white-dark"], ["for", "description"], ["formControlName", "description", 1, "form-input", "text-white-dark"], ["for", "batch_process_count"], ["type", "text", "readonly", "", 1, "form-input", "text-white-dark", 3, "value"], [1, "mb-12"], ["class", "table", 4, "ngIf"], [1, "table"], ["width", "30%"], [4, "ngFor", "ngForOf"], ["formGroupName", "individual_fields", 4, "ngIf"], ["colspan", "3"], [1, "flex"], ["type", "button", "role", "button", 1, "btn", "btn-primary", "!mt-6", "mr-3", 3, "click"], [3, "for"], [1, "form-select", "text-white-dark", 3, "id", "formControlName"], [1, "flex", "list-inside", "list-disc", "space-x-3", "font-semibold", "dark:text-[#d0d2d6]", "rtl:space-x-reverse"], ["class", "mb-1", 4, "ngIf"], [1, "mb-1"], ["formGroupName", "individual_fields"], ["colspan", "3", 1, "text-lg", "font-bold"], ["type", "text", 1, "form-input", "text-white-dark", 3, "id", "formControlName"], ["class", "rounded-lg bg-white shadow-md", 4, "ngIf"], ["class", "mb-12", 4, "ngIf"], [1, "rounded-lg", "bg-white", "shadow-md"], [1, "w-full", "border", "border-gray-300"], [1, "border", "px-4", "py-2", "text-left"], [1, "border", "px-4", "py-2", "font-medium", "text-gray-700"], ["class", "text-danger", 4, "ngIf"], [1, "border", "px-4", "py-2"], ["class", "list-inside list-disc text-red-500", 4, "ngIf"], ["class", "list-inside list-disc text-yellow-500", 4, "ngIf"], [1, "list-inside", "list-disc", "text-red-500"], [1, "list-inside", "list-disc", "text-yellow-500"], [1, "my-4", "flex", "flex-wrap", "items-center", "justify-between", "rounded-lg", "bg-gray-50", "dark:bg-[#1b1f38]"], [1, "flex", "items-center", "space-x-4"], [1, "space-x-2", "text-lg", "font-bold"], [1, "flex", "items-center", "space-x-2"], [1, "h-4", "w-4", "rounded-full"], [1, "text-sm", "font-bold", "text-gray-600"], [1, "text-sm", "font-bold", "text-gray-800", "dark:text-white"], [1, "h-4", "w-4", "rounded-full", "bg-red-200"], [1, "text-sm", "font-semibold", "text-red-600"], [1, "h-4", "w-4", "rounded-full", "bg-green-200"], [1, "text-sm", "font-semibold", "text-green-600"], [1, "h-4", "w-4", "rounded-full", "bg-yellow-200"], [1, "text-sm", "font-semibold", "text-yellow-600"], ["class", "mb-4 rounded-lg bg-red-100 p-4 text-red-800", 4, "ngIf"], [3, "data", "config"], ["type", "button", 1, "btn", "btn-primary", "!mt-6", "mr-3", 3, "click"], ["type", "button", "class", "btn btn-primary !mt-6 mr-3", 3, "click", 4, "ngIf"], ["type", "button", "class", "btn btn-warning !mt-6 mr-3", 3, "click", 4, "ngIf"], [1, "mb-4", "rounded-lg", "bg-red-100", "p-4", "text-red-800"], ["type", "button", 1, "btn", "btn-warning", "!mt-6", "mr-3", 3, "click"]], template: function ImportMasterComponent_Template(rf, ctx) {
  if (rf & 1) {
    \u0275\u0275elementStart(0, "div", 0);
    \u0275\u0275template(1, ImportMasterComponent_div_1_Template, 3, 2, "div", 1)(2, ImportMasterComponent_div_2_Template, 17, 21, "div", 2);
    \u0275\u0275elementEnd();
  }
  if (rf & 2) {
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", ctx.isLoading);
    \u0275\u0275advance();
    \u0275\u0275property("ngIf", !ctx.isLoading);
  }
}, dependencies: [CommonSharedModule, NgClass, NgForOf, NgIf, \u0275NgNoValidate, NgSelectOption, \u0275NgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, SelectControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinValidator, TranslatePipe, OrderByPipe, ReactiveFormsModule, FormGroupDirective, FormControlName, FormGroupName, ClientDatatableComponent], styles: ["\n\n  .bg-red-200 {\n  background-color: #f8d7da;\n}\n  .text-red-600 {\n  color: #721c24;\n}\n  .bg-orange-200 {\n  background-color: #ffeeba;\n}\n  .text-orange-600 {\n  color: #856404;\n}\n  .form-input.ng-invalid.ng-dirty,   .ng-submitted .form-input.ng-invalid,   .ng-submitted .form-input:invalid {\n  --tw-border-opacity: 1;\n  border-color: rgb(231 81 90/var(--tw-border-opacity));\n  background-color: rgba(231, 81, 90, 0.08);\n  --tw-text-opacity: 1;\n  color: rgb(231 81 90/var(--tw-text-opacity));\n}\n  .form-select.ng-invalid.ng-dirty,   .ng-submitted .form-select.ng-invalid,   .ng-submitted .form-select:invalid {\n  --tw-text-opacity: 1;\n  border-color: rgb(231 81 90/var(--tw-text-opacity));\n  background-color: rgba(231, 81, 90, 0.0784313725);\n  color: inherit;\n}\n  .loader-overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background: rgba(19, 18, 18, 0.23);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  z-index: 51;\n}\n  .spinner {\n  border: 4px solid #f3f3f3;\n  border-top: 4px solid #3498db;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n@keyframes _ngcontent-%COMP%_spin {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n/*# sourceMappingURL=import-master.component.css.map */"] });
var ImportMasterComponent = _ImportMasterComponent;
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ImportMasterComponent, { className: "ImportMasterComponent", filePath: "src\\app\\@lcp-framework\\pages\\import-master\\import-master.component.ts", lineNumber: 105 });
})();
export {
  ImportMasterComponent
};
//# sourceMappingURL=chunk-CFAEF4MZ.js.map
