import{a as e}from"./chunk-C7X57YQ4.js";var s={keywords:"",status:null,customer:null,oppositeParty:null,representative:null,dateFrom:"",dateTo:"",SortColumn:"costDrv",SortOrder:"desc"},n=class{static mapArrayToStrings(r){return!r||!Array.isArray(r)?[]:r.map(t=>typeof t=="string"?t:typeof t=="object"&&t&&(t.id||t.value||t.key||t.name)||String(t))}static formatDateOnly(r){if(!r)return"";let t=typeof r=="string"?new Date(r):r;return isNaN(t.getTime())?"":t.toISOString().split("T")[0]}static parseDate(r){if(!r)return null;let t=new Date(r);return isNaN(t.getTime())?null:t}static formatCurrency(r,t="EUR"){return r==null?"0.00":new Intl.NumberFormat("sr-RS",{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(r)}static formatDecimal(r,t=2){return r==null?"0.00":new Intl.NumberFormat("sr-RS",{minimumFractionDigits:t,maximumFractionDigits:t}).format(r)}static parseNumber(r){if(r==null||r==="")return null;let t=typeof r=="string"?parseFloat(r):r;return isNaN(t)?null:t}static isValidEmail(r){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)}static truncateText(r,t=50){return!r||r.length<=t?r||"":r.substring(0,t)+"..."}static getStatusDisplayName(r){switch(r?.toUpperCase()){case e.IN_PROGRESS:return"U toku";case e.INACTIVE:return"Neaktivno";case e.FINISHED:return"Zatvoreno";default:return r||""}}static getStatusColor(r){switch(r?.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)"}}};export{s as a,n as b};
