1import{g as ie,h as ae,i as re}from"./chunk-2Y3QY3KH.js";import{h as ne}from"./chunk-V44JKVCJ.js";import{a as pe,b as se}from"./chunk-MGEXWNYY.js";import{b as de}from"./chunk-HMMSN6SK.js";import{h as te,k as oe}from"./chunk-F5WZP3DK.js";import{a as k,b as z,e as q,f as H}from"./chunk-EGASWDO3.js";import{P as L}from"./chunk-367H7HI2.js";import{a as P}from"./chunk-PAVZIIHI.js";import{b as A,c as G}from"./chunk-HJ5F4E3Z.js";import{e as V,g as J,h as K,j as Q,k as W,l as X,m as Y,n as Z,o as ee}from"./chunk-5GPX5V7K.js";import{Ba as B,G as R,I as w,h as U,i as j,t as x,w as E,za as $}from"./chunk-JKDJVDQU.js";import"./chunk-P5L4644C.js";import{b as le}from"./chunk-K3AP6P4X.js";import{f as me}from"./chunk-WHBYJA7R.js";import{$c as O,Ab as F,Kb as _,O as b,Va as m,ac as d,bb as l,bc as h,ed as N,fb as S,gb as M,ja as g,kb as D,o as y,pa as v,pc as T,qc as I,u as C,xb as a,yb as p,zb as s}from"./chunk-UWZVHGDU.js";import"./chunk-Q2OOS27M.js";function fe(i,e){if(i&1&&(p(0,"span",12),d(1),s()),i&2){let t=e.item;a("title",t.description),m(),h(t.name)}}function ge(i,e){if(i&1&&(p(0,"span",12),d(1),s()),i&2){let t=e.item;a("title",t.description),m(),h(t.name)}}var r,c=(r=class{constructor(e,t,o,n,u,ce,f){this.modalRef=e,this.cottonSustainability=t,this._toastr=o,this._loading=n,this.fb=u,this._readOnly=ce,this._data=f,this.faFileUpload=L,this.appReadOnly$=this._readOnly.appReadOnly$,this.fileSelected=!1,this.categories=[],f&&(this.docId=f.documentId)}ngOnInit(){this.cottonSustainability.getDocumentCategories().pipe(se(this)).subscribe(e=>{this.categories=e}),console.log("yeet"),this.documentUploadForm=this.fb.group({categoryDetails:[]}),this.appReadOnly$.pipe(g(e=>{e&&this.documentUploadForm.get("categoryDetails")?.disable()})).subscribe()}changeCategory(){let e=this.documentUploadForm.value,t={documentId:this.docId,categoryId:e.categoryDetails.categoryId},o=this.cottonSustainability.updateDocumentCategeory(t).pipe(g(n=>this._toastr.success("Document Category Changed.","Document Category")),b(n=>{let u=me(n)||"There was an error with your request.";return this._toastr.error(u,"Document Category Error"),C(void 0)}));this._loading.while(o).subscribe(n=>this.modalRef.close())}},r.\u0275fac=function(t){return new(t||r)(l(K),l(le),l(P),l(A),l(R),l(de),l(J,8))},r.\u0275cmp=S({type:r,selectors:[["app-document-category-change"]],inputs:{userName:"userName",userType:"userType",organizationName:"organizationName"},standalone:!1,decls:19,vars:9,consts:[[3,"formGroup"],["seamModalTitle",""],["size","sm",1,"header-icon",3,"icon"],["type","button","aria-label","Close","data-dismiss","modal","seamModalClose","",1,"close"],["aria-hidden","true"],[1,"pl-2","pr-2","upload-input"],["label","Category:",1,"upload-label","ml-2"],["seamInput","","bindLabel","name","labelForId","category","placeholder","Select categories","clearAllText","Clear","formControlName","categoryDetails",3,"items","multiple"],["ng-label-tmp",""],["ng-option-tmp",""],["type","button","data-dismiss","modal","seamModalClose","",1,"btn","btn-lightgray"],["type","button",1,"btn","btn-success",3,"click","disabled"],[3,"title"]],template:function(t,o){t&1&&(p(0,"seam-modal-header",0)(1,"h4",1),F(2,"fa-icon",2),d(3," Change Category "),s(),p(4,"button",3)(5,"span",4),d(6,"\xD7"),s()()(),p(7,"seam-modal-body",0)(8,"div",5)(9,"seam-form-field",6)(10,"ng-select",7),D(11,fe,2,2,"ng-template",8)(12,ge,2,2,"ng-template",9),s()()()(),p(13,"seam-modal-footer",0)(14,"button",10),d(15," Cancel "),s(),p(16,"button",11),T(17,"async"),_("click",function(){return o.changeCategory()}),d(18," Change "),s()()),t&2&&(a("formGroup",o.documentUploadForm),m(2),a("icon",o.faFileUpload),m(5),a("formGroup",o.documentUploadForm),m(3),a("items",o.categories)("multiple",!1),m(3),a("formGroup",o.documentUploadForm),m(3),a("disabled",!o.documentUploadForm.valid||I(17,7,o.appReadOnly$)))},dependencies:[U,j,x,E,ae,ie,te,$,q,k,z,Z,W,X,Y,Q,O],styles:[".upload-input[_ngcontent-%COMP%]{margin-right:.5rem!important}.upload-input[_ngcontent-%COMP%] .upload-label[_ngcontent-%COMP%]{padding-top:10px}.upload-container[_ngcontent-%COMP%]{display:flex;flex-direction:row}.upload-container[_ngcontent-%COMP%] .file-input[_ngcontent-%COMP%]{width:350px;flex-grow:1}"]}),r);c=y([pe()],c);var Ve=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=M({type:e}),e.\u0275inj=v({imports:[N,w,re,ne,oe,B,H,ee,G,V.forChild(c)]});let i=e;return i})();export{Ve as DocumentCategoryChangeModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.