import{a as S}from"./chunk-FTZB46FO.js";import{s}from"./chunk-2UFYIZBQ.js";import{c as f,f as D,s as l,t as I}from"./chunk-BRJ3RGGT.js";import{a as d,b as h}from"./chunk-NUAVJ2U7.js";import{c,d as v}from"./chunk-E7BKRPHP.js";import{nd as b,qa as m,va as p}from"./chunk-PGS4AHIT.js";I();v();var y=class{static produceClassificationFilterLookupField(n){return{id:"classifications",label:"Classification",noneOption:!0,multiselect:!0,searchable:!0,hideFeatureId:"Documents.Filter.Classification",canClear:!0,component:s,apiRequest:e=>n.get(l.general.classificationLookupAuth(e)),valueMapper:e=>c.numToStr(e?.qid??0),labelMapper:e=>c.notEmpty(e?.typeDesc)?`${e?.type} - ${e?.typeDesc}`:`${e?.type}`}}static produceClassificationFormField(n,e,t){return{id:"classificationId",label:"Classification",options:[],searchable:!0,required:!0,feature:e,component:s,lazyLoad:!0,apiRequest:r=>t.get(l.general.classificationLookupAuth(r)),valueMapper:r=>r?.qid,labelMapper:r=>c.notEmpty(r?.typeDesc)?`${r?.type} - ${r?.typeDesc}`:`${r?.type}`,valueSetter:r=>r.value,modelToOptionMapper:(r,o)=>{let a=o;return{qid:r,type:a.classificationType,typeDesc:a.classification}},onSelected:(r,o,a,u,L,$)=>{n(o,u,$)}}}static produceDocTypeStatusFilterLookupField(n){return{id:"statuses",label:"Status",noneOption:!0,multiselect:!0,searchable:!0,canClear:!0,component:s,apiRequest:e=>n.get(l.documents.docTypeStatusLookup(e)),valueMapper:e=>e.status,labelMapper:e=>`${e.status} - ${e.name}`}}static produceDocTypesFormField(n,e){return{id:"docType",label:"DocumentType",component:s,options:[],searchable:!0,required:!0,feature:n,valueMapper:t=>t.id,labelMapper:t=>`${t.docTypeView} - ${t.name}`,valueSetter:t=>t.value,onSelected:(t,r,o,a,u)=>{e(t,u,r)},onSearch:(t,r)=>{let o=t.toLowerCase();return r.options?.filter(a=>a.name.toLowerCase().includes(o)||a.id.toLowerCase().includes(o))||[]}}}};var g=function(i){return i.FileLoadingUnsupported="FILE_LOADING_UNSUPPORTED",i}(g||{});h();b();D();var E=(()=>{class i{constructor(e,t){this.irisDialogService=e,this.translate=t}openDocumentStorageIris1000000482(e,t,r){let o=this.irisDialogService.open({irisId:"1000000482",contentTags:{S0:`${e.name} - ${e.description}`,S1:"LoadDocuments",S2:`${t.type} - ${t.name}`,S3:r.name||""},filterItems:[10,20,50],irisActions:[{anNo:10,onSelected:()=>{document.location=`${d.backofficeUrl}Settings?type=Classifications&id=Settings&selected=${t.id}`}},{anNo:20,onSelected:()=>{document.location=`${d.backofficeUrl}DocumentType/Edit?id=${r.id}`}},{anNo:50,onSelected:()=>{o.close()}},{anNo:51,caption:"ViewInstructions",description:"ViewInstructionsDescription",onSelected:()=>{window.open(this.translate.instant("HelpUrl"),"_blank")}}]});return o}static{this.\u0275fac=function(t){return new(t||i)(p(S),p(f))}}static{this.\u0275prov=m({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a,g as b,E as c};
