var n=function(e){return e.IN_PROGRESS="I",e.INACTIVE="N",e.FINISHED="F",e}(n||{});var s=function(e){return e.BASE="status-btn",e.ORANGE="status-btn status-btn-orange",e.GREEN="status-btn status-btn-green",e.RED="status-btn status-btn-red",e.GREY="status-btn status-btn-grey",e}(s||{});var a=function(e){return e.HOURGLASS="fas fa-hourglass-half",e.TIMES="fas fa-times",e.CHECK="fas fa-check",e.QUESTION="fas fa-question",e.FILE="fas fa-file",e.SAVE="fas fa-save",e.TRASH="fas fa-trash",e}(a||{});var E={keywords:"",status:null,customer:null,oppositeParty:null,representative:null,dateFrom:"",dateTo:"",SortColumn:"costDrv",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 n.IN_PROGRESS:return"U toku";case n.INACTIVE:return"Neaktivno";case n.FINISHED:return"Zatvoreno";default:return t||""}}static getStatusColor(t){switch(t?.toUpperCase()){case n.IN_PROGRESS:return"var(--paw-color-warning)";case n.INACTIVE:return"var(--paw-color-error)";case n.FINISHED:return"var(--paw-color-success)";default:return"var(--paw-text-secondary)"}}};var u=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 getStatusInfo(t,r){let c=(t||"").toString().trim().toUpperCase();switch(c){case n.IN_PROGRESS:return{text:r.instant("InProgress"),cssClass:s.ORANGE,icon:a.HOURGLASS};case n.INACTIVE:return{text:r.instant("Inactive"),cssClass:s.RED,icon:a.TIMES};case n.FINISHED:return{text:r.instant("Closed"),cssClass:s.GREEN,icon:a.CHECK};default:return{text:c,cssClass:s.GREY,icon:a.QUESTION}}}static isActiveStatus(t){return(t||"").toString().trim().toUpperCase()===n.IN_PROGRESS}static isClosedStatus(t){return(t||"").toString().trim().toUpperCase()===n.FINISHED}static isInactiveStatus(t){return(t||"").toString().trim().toUpperCase()===n.INACTIVE}static getStatusCssClass(t){switch((t||"").toString().trim().toUpperCase()){case n.IN_PROGRESS:return s.ORANGE;case n.INACTIVE:return s.RED;case n.FINISHED:return s.GREEN;default:return s.GREY}}static getStatusIcon(t){switch((t||"").toString().trim().toUpperCase()){case n.IN_PROGRESS:return a.HOURGLASS;case n.INACTIVE:return a.TIMES;case n.FINISHED:return a.CHECK;default:return a.QUESTION}}};export{s as a,a as b,E as c,o as d,u as e};
