import{u as n}from"./chunk-APYRIPVN.js";import{s,t as y}from"./chunk-A7Q254KY.js";import{c as i,d}from"./chunk-YADAVUVK.js";y();d();var p=class{static produceClassificationFilterLookupField(a){return{id:"classifications",label:"Classification",noneOption:!0,multiselect:!0,searchable:!0,hideFeatureId:"Documents.Filter.Classification",canClear:!0,component:n,apiRequest:e=>a.get(s.general.classificationLookupAuth(e)),valueMapper:e=>i.numToStr(e?.qid??0),labelMapper:e=>i.notEmpty(e?.typeDesc)?`${e?.type} - ${e?.typeDesc}`:`${e?.type}`}}static produceClassificationFormField(a,e,r){return{id:"classificationId",label:"Classification",options:[],searchable:!0,required:!0,feature:e,component:n,lazyLoad:!0,apiRequest:t=>r.get(s.general.classificationLookupAuth(t)),valueMapper:t=>t?.qid,labelMapper:t=>i.notEmpty(t?.typeDesc)?`${t?.type} - ${t?.typeDesc}`:`${t?.type}`,valueSetter:t=>t.value,modelToOptionMapper:(t,o)=>{let u=o;return{qid:t,type:u.classificationType,typeDesc:u.classification}},onSelected:(t,o,u,l,m,c)=>{a(o,l,c)}}}static produceDocTypeStatusFilterLookupField(a){return{id:"statuses",label:"Status",noneOption:!0,multiselect:!0,searchable:!0,canClear:!0,component:n,apiRequest:e=>a.get(s.documents.docTypeStatusLookup(e)),valueMapper:e=>e.status,labelMapper:e=>`${e.status} - ${e.name}`}}static produceDocTypesFormField(a,e){return{id:"docType",label:"DocumentType",component:n,options:[],searchable:!0,required:!0,feature:a,valueMapper:r=>r.id,labelMapper:r=>`${r.docTypeView} - ${r.name}`,valueSetter:r=>r.value,onSelected:(r,t,o,u,l)=>{e(r,l,t)},onSearch:(r,t)=>{let o=r.toLowerCase();return t.options?.filter(u=>u.name.toLowerCase().includes(o)||u.id.toLowerCase().includes(o))||[]}}}};export{p as a};
