import{d as S,r as w,_ as D,o as _,c as v,a as y,n as o,p as s,l as a,t as c,q as V}from"./app-DZcRemIr.js";import{A as g}from"./AppLayout-O17sF3e2.js";import{G as A}from"./GenericTable-B-cIX9aY.js";import"./AppSidebarLayout-DzMma2g7.js";import"./index-CA0zsXLm.js";import"./SiifIconBC3-DYQKLzWx.js";import"./GlobalTable-DcNRAfk4.js";import"./SelectValue-CSZtknPb.js";import"./useNonce-PBIDXYJz.js";import"./Input-C686KDpn.js";const N=S({__name:"Demo.2",setup(u,{expose:l}){l();const m=[{label:"Dashboard",href:"dashboard"},{label:"Demo"}],e=Array.from({length:20},(t,i)=>({id:i+1,name:`Persona ${i+1}`,age:20+i%30})),r=[{key:"id",label:"ID",className:"px-4"},{key:"name",label:"Nombre",className:"px-4"},{key:"age",label:"Edad",className:"px-4"}],d=[...r,{key:"date",label:"Fecha",className:"px-4"}],n=e.map(t=>({...t,date:new Date(2025,t.id%12,t.id*3%28+1).toISOString().substr(0,10)}));function h(){console.log("refrescar filas…")}const p=w([]),x=[{label:"Cliente A",value:"A"},{label:"Cliente B",value:"B"},{label:"Cliente C",value:"C"}],b=w(null);function C(t){b.value=t}const f={breadcrumbs:m,rows:e,cols:r,colsWithDate:d,rowsWithDate:n,fetchRows:h,selected:p,clientOptions:x,chosenClient:b,onClientSelect:C,AppLayout:g,GenericTable:A};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),B={class:"p-4 space-y-12"};function R(u,l,m,e,r,d){return _(),v(e.AppLayout,{breadcrumbs:e.breadcrumbs},{default:y(()=>[o("div",B,[s(" 1) Filtro + Refresh "),o("section",null,[l[2]||(l[2]=o("h2",{class:"text-xl font-semibold mb-2"},null,-1)),a(e.GenericTable,{columns:e.colsWithDate,rows:e.rowsWithDate,showFilter:"",filterPlaceholder:"Buscar por nombre o fecha...",showRefresh:"",onRefresh:e.fetchRows},null,8,["rows"])]),s(" 2) Selección múltiple "),o("section",null,[l[3]||(l[3]=o("h2",{class:"text-xl font-semibold mb-2"},null,-1)),a(e.GenericTable,{columns:e.cols,rows:e.rows,showFilter:"",selectable:"",modelValue:e.selected,"onUpdate:modelValue":l[0]||(l[0]=n=>e.selected=n)},null,8,["rows","modelValue"])]),s(" 3) Select + Acción "),o("section",null,[l[4]||(l[4]=o("h2",{class:"text-xl font-semibold mb-2"},null,-1)),a(e.GenericTable,{columns:e.cols,rows:e.rows,showSelectAction:"",selectOptions:e.clientOptions,onSelect:e.onClientSelect,showSaveButton:""},null,8,["rows"]),o("p",null,"Cliente elegido: "+c(e.chosenClient),1)]),s(" 4) Combinado "),o("section",null,[l[6]||(l[6]=o("h2",{class:"text-xl font-semibold mb-2"},null,-1)),a(e.GenericTable,{columns:e.colsWithDate,rows:e.rowsWithDate,showFilter:"",filterPlaceholder:"Filtro general...",showRefresh:"",onRefresh:e.fetchRows,selectable:"",modelValue:e.selected,"onUpdate:modelValue":l[1]||(l[1]=n=>e.selected=n),showSelectAction:"",selectOptions:e.clientOptions,onSelect:e.onClientSelect,showSaveButton:""},null,8,["rows","modelValue"]),o("p",null,[l[5]||(l[5]=V("Seleccionadas: ",-1)),o("pre",null,c(e.selected),1)]),o("p",null,"Cliente: "+c(e.chosenClient),1)])])]),_:1})}const U=D(N,[["render",R],["__file","/var/www/resources/js/pages/Demo.2.vue"]]);export{U as default};
