import"./chunk-QTnfLwEv.js";import{n as e,t}from"./jsx-runtime-BWRPWl8p.js";import{i as n,t as r}from"./axios-Yyz76XvX.js";import{$r as i,Ni as a,Qr as o,Xr as s,Zr as c,Zt as l,ca as u,ei as d,po as f,ut as p,z as m}from"./endpoints-BWeG8ngA.js";import{Da as h,Ei as g,En as _,Qt as v,ma as y}from"./index-DccLTdzK.js";e();async function b(e,t,i){return await r.get(n+l+`/?fechaInicio=${e}&&fechaFin=${t}&&areaEspecifica=${i}`,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function x(e,t){return await r.get(n+d+`/?fechaInicio=${e}&&fechaFin=${t}`,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function S(e,t){return await r.get(n+i+`/?fechaInicio=${e}&&fechaFin=${t}`,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function C(e){return await r.post(n+f,e,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function w(e){return await r.get(n+u+`/${e}`,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function T(e,t){return await r.put(n+m+`/${e}`,t,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function E(e,t){return await r.put(n+p+`/${e}`,t,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function D(){return await r.get(n+a,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function O(){return await r.get(n+o,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function k(e){return await r.get(n+s+`/${e}`,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}async function A(e){return await r.get(n+c+`/${e}`,{headers:{Accept:`application/json`,"Content-Type":`application/json`}})}var j=t(),M=({data:e,setShow:t})=>{let n=e[0];return(0,j.jsxs)(`div`,{style:{padding:`2%`,textAlign:`center`},children:[(0,j.jsx)(`h4`,{style:{marginBottom:`2%`},children:`¿Cancelar vale de material?`}),(0,j.jsx)(`div`,{style:{textAlign:`center`},children:(0,j.jsxs)(y,{variant:`warning`,onClick:async()=>{try{E(n,{estado:`0`}).then(e=>{let{data:r}=e;v(`Se ha cancelado el vale `+n),h.warning(`Vale cancelado`),t(!1)})}catch(e){console.log(e)}},children:[(0,j.jsx)(g,{icon:_}),` Cancelar`]})})]})};export{O as a,D as c,A as d,C as f,b as i,w as l,E as n,S as o,T as r,x as s,M as t,k as u};