import{br as o,A as a}from"./index.cf09daef.js";const m=o("payment-method",{state:()=>({rows:[],permissions:{new:"settings:payment-methods",edit:"settings:payment-methods",delete:"settings:payment-methods"}}),actions:{get(e){return new Promise((s,n)=>{a.get("payment-methods",e).then(t=>{s(t),this.setRows(t)}).catch(t=>{n(t)})})},show(e){return new Promise((s,n)=>{a.get(`payment-methods/${e}`).then(t=>{s(t)}).catch(t=>{n(t)})})},store(e){return new Promise((s,n)=>{a.post("payment-methods/store",e).then(t=>{this.pushRows(t.data),s(t)}).catch(t=>{n(t)})})},update(e){return new Promise((s,n)=>{a.post(`payment-methods/${e.id}`,e).then(t=>{s(t),this.editRows(t.data)}).catch(t=>{n(t)})})},disable(e){return new Promise((s,n)=>{a.post(`payment-methods/${e}/disable`).then(t=>{s(t),this.editRows(t.data)}).catch(t=>{n(t)})})},enable(e){return new Promise((s,n)=>{a.post(`payment-methods/${e}/enable`).then(t=>{s(t),this.editRows(t.data)}).catch(t=>{n(t)})})}}});export{m as u};
