import{f as d}from"./validate.93ab4ac7.js";import{U as a,b3 as u,b4 as s}from"./index.4d3e3847.js";function o(r,t="status"){return{cellRenderer({row:n}){const e=r.find(l=>l.id===String(n[t]));return a(u,{type:e&&e.type?e.type:""},{default:()=>(e==null?void 0:e.label)||"--"})}}}function p(r="image"){return{cellRenderer({row:t}){return a(s,{src:t[r],fit:"cover",lazy:!0,style:"width: 33px; height: 22px","preview-src-list":t[r]!==""?[t[r]]:[],"z-index":99999,"preview-teleported":!0},{default:()=>"--"})}}}function h(r){return{cellRenderer({row:t}){if(d(t[r])){const n=[];return t[r].forEach(e=>{n.push(a(s,{src:e,fit:"cover",lazy:!0,style:"width: 33px; height: 22px; margin:0 0 0 10px","preview-src-list":e!==""?[e]:[],"z-index":99999,"preview-teleported":!0},{default:()=>"--"}))}),a("div",{},n)}else return""}}}function v(r){return{cellRenderer({row:t}){const n=[];return t[r].forEach(e=>{n.push(a(u,{type:"",style:"margin:0 0 0 10px"},{default:()=>`${e.key}:${e.value}`||"--"}))}),a("div",{},n)}}}function y(r,t="id"){return r.map(n=>({value:n[t],label:n.label}))}function g(r,t){return{cellRenderer({row:n}){let e="";return r.forEach((l,i)=>{e+=i===0?`${n[l]}`:` ${t}${n[l]}`}),e}}}export{p as a,h as b,y as c,v as d,o as r,g as t};
