var e=function(s){return s.IN_PROGRESS="I",s.INACTIVE="N",s.FINISHED="F",s}(e||{});var n=function(s){return s.BASE="status-btn",s.ORANGE="status-btn status-btn-orange",s.GREEN="status-btn status-btn-green",s.RED="status-btn status-btn-red",s.GREY="status-btn status-btn-grey",s}(n||{});var a=function(s){return s.HOURGLASS="fas fa-hourglass-half",s.TIMES="fas fa-times",s.CHECK="fas fa-check",s.QUESTION="fas fa-question",s.FILE="fas fa-file",s.SAVE="fas fa-save",s.TRASH="fas fa-trash",s}(a||{});var l={keywords:"",status:"I",customer:null,oppositeParty:null,representative:null,dateFrom:"",dateTo:"",SortColumn:"AcCostDrv",SortOrder:"desc",start:0,length:50},o=class{static mapArrayToStrings(t){return!t||!Array.isArray(t)?[]:t.map(r=>typeof r=="string"?r:typeof r=="object"&&r&&(r.id||r.value||r.key||r.name)||String(r))}static formatDateOnly(t){if(!t)return"";let r=typeof t=="string"?new Date(t):t;return isNaN(r.getTime())?"":r.toISOString().split("T")[0]}static parseDate(t){if(!t)return null;let r=new Date(t);return isNaN(r.getTime())?null:r}static formatCurrency(t,r="EUR"){return t==null?"0.00":new Intl.NumberFormat("sr-RS",{style:"currency",currency:r,minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}static formatDecimal(t,r=2){return t==null?"0.00":new Intl.NumberFormat("sr-RS",{minimumFractionDigits:r,maximumFractionDigits:r}).format(t)}static parseNumber(t){if(t==null||t==="")return null;let r=typeof t=="string"?parseFloat(t):t;return isNaN(r)?null:r}static isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}static truncateText(t,r=50){return!t||t.length<=r?t||"":t.substring(0,r)+"..."}static getStatusDisplayName(t){switch(t?.toUpperCase()){case e.IN_PROGRESS:return"U toku";case e.INACTIVE:return"Neaktivno";case e.FINISHED:return"Zatvoreno";default:return t||""}}static getStatusColor(t){switch(t?.toUpperCase()){case e.IN_PROGRESS:return"var(--paw-color-warning)";case e.INACTIVE:return"var(--paw-color-error)";case e.FINISHED:return"var(--paw-color-success)";default:return"var(--paw-text-secondary)"}}};var i=class{static getStatusMarkup(t,r){let c=this.getStatusInfo(t,r);return`<span class="${c.cssClass}">
              <span class="status-icon"><i class="${c.icon}"></i></span>
              <span class="status-text">${c.text}</span>
            </span>`}static getStatusMarkupWithName(t,r){let c=this.getStatusCssClass(t),u=this.getStatusIcon(t);return`<span class="${c}">
              <span class="status-icon"><i class="${u}"></i></span>
              <span class="status-text">${r}</span>
            </span>`}static getStatusInfo(t,r){let c=(t||"").toString().trim().toUpperCase();switch(c){case e.IN_PROGRESS:return{text:r.instant("InProgress"),cssClass:n.ORANGE,icon:a.HOURGLASS};case e.INACTIVE:return{text:r.instant("Inactive"),cssClass:n.RED,icon:a.TIMES};case e.FINISHED:return{text:r.instant("Closed"),cssClass:n.GREEN,icon:a.CHECK};default:return{text:c,cssClass:n.GREY,icon:a.QUESTION}}}static isActiveStatus(t){return(t||"").toString().trim().toUpperCase()===e.IN_PROGRESS}static isClosedStatus(t){return(t||"").toString().trim().toUpperCase()===e.FINISHED}static isInactiveStatus(t){return(t||"").toString().trim().toUpperCase()===e.INACTIVE}static getStatusCssClass(t){switch((t||"").toString().trim().toUpperCase()){case e.IN_PROGRESS:return n.ORANGE;case e.INACTIVE:return n.RED;case e.FINISHED:return n.GREEN;default:return n.GREY}}static getStatusIcon(t){switch((t||"").toString().trim().toUpperCase()){case e.IN_PROGRESS:return a.HOURGLASS;case e.INACTIVE:return a.TIMES;case e.FINISHED:return a.CHECK;default:return a.QUESTION}}};export{n as a,a as b,l as c,o as d,i as e};
