import{d as p,T as _,c as i,o as l,a as e,t as a,x as y,l as m,i as d,v as u,u as t,A as v,b}from"./app-Do7K7VDV.js";import{_ as f}from"./AdminLayout-DeT_GLTC.js";import{_ as g}from"./SpinnerBtn-C-rqKjUt.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const h={class:"space-y-6"},k={class:"grid grid-cols-1 md:grid-cols-2"},q={class:"mt-5"},V={class:"mt-5"},U={class:"card"},w={class:"card-body"},C={class:"mb-4"},M={class:"required",for:"name"},x={key:0,class:"invalid-feedback"},A={class:"mb-4"},N={class:"required",for:"logo"},S={key:0,class:"invalid-feedback"},B={class:"mb-4"},D={class:"required",for:"currency"},G={key:0,class:"invalid-feedback"},I={class:"mb-4"},P={class:"required",for:"min_amount"},T={key:0,class:"invalid-feedback"},$={class:"mb-4"},j={class:"required",for:"max_amount"},E={key:0,class:"invalid-feedback"},L={class:"mb-4"},O={class:"required",for:"charge"},z={key:0,class:"invalid-feedback"},F={class:"mb-4"},H={class:"required",for:"multiply"},J={key:0,class:"invalid-feedback"},K={class:"mb-4"},Q={class:"required",for:"status"},R={key:0,class:"invalid-feedback"},W={class:"mb-4"},X={class:"required",for:"status"},Y={value:"1"},Z={value:"0"},ee={key:0,class:"invalid-feedback"},se={class:"mb-4"},te=p({layout:f}),ue=Object.assign(te,{__name:"Create",props:["segments","buttons"],setup(ae){const s=_({name:null,logo:null,currency:null,min_amount:1,max_amount:10,charge:0,multiply:1,comment:null,status:1,is_crypto:!1}),c=()=>{s.post("/admin/gateways")};return(r,o)=>(l(),i("div",h,[e("div",k,[e("div",q,[e("strong",null,a(r.trans("Create Payment Gateway")),1),e("p",null,a(r.trans("Create manual payment gateway for accepting payment")),1)]),e("div",V,[e("form",{onSubmit:y(c,["prevent"]),enctype:"multipart/form-data"},[e("div",U,[e("div",w,[e("div",C,[e("label",M,a(r.trans("Gateway Name")),1),m(e("input",{"onUpdate:modelValue":o[0]||(o[0]=n=>t(s).name=n),type:"text",class:"input",name:"name",id:"name"},null,512),[[u,t(s).name]]),t(s).errors.name?(l(),i("div",x,a(t(s).errors.name),1)):d("",!0)]),e("div",A,[e("label",N,a(r.trans("Logo")),1),e("input",{type:"file",id:"logo",onInput:o[1]||(o[1]=n=>t(s).logo=n.target.files[0]),class:"input",name:"logo",accept:"image/*"},null,32),t(s).errors.logo?(l(),i("div",S,a(t(s).errors.logo),1)):d("",!0)]),e("div",B,[e("label",D,a(r.trans("Currency")),1),m(e("input",{"onUpdate:modelValue":o[2]||(o[2]=n=>t(s).currency=n),type:"text",class:"input",name:"currency",id:"currency",required:""},null,512),[[u,t(s).currency]]),t(s).errors.currency?(l(),i("div",G,a(t(s).errors.currency),1)):d("",!0)]),e("div",I,[e("label",P,a(r.trans("Minimum Amount")),1),m(e("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>t(s).min_amount=n),type:"number",name:"min_amount",id:"min_amount",step:"any",class:"input",required:""},null,512),[[u,t(s).min_amount]]),t(s).errors.min_amount?(l(),i("div",T,a(t(s).errors.min_amount),1)):d("",!0)]),e("div",$,[e("label",j,a(r.trans("Maximum Amount")),1),m(e("input",{"onUpdate:modelValue":o[4]||(o[4]=n=>t(s).max_amount=n),type:"number",name:"max_amount",id:"max_amount",step:"any",class:"input",required:""},null,512),[[u,t(s).max_amount]]),t(s).errors.max_amount?(l(),i("div",E,a(t(s).errors.max_amount),1)):d("",!0)]),e("div",L,[e("label",O,a(r.trans("Gateway Charge")),1),m(e("input",{type:"number",step:"any","onUpdate:modelValue":o[5]||(o[5]=n=>t(s).charge=n),class:"input",name:"charge",id:"charge",required:""},null,512),[[u,t(s).charge]]),t(s).errors.charge?(l(),i("div",z,a(t(s).errors.charge),1)):d("",!0)]),e("div",F,[e("label",H,a(r.trans("Multiply from base currency")),1),m(e("input",{type:"number",step:"any","onUpdate:modelValue":o[6]||(o[6]=n=>t(s).multiply=n),class:"input",name:"multiply",id:"multiply",required:""},null,512),[[u,t(s).multiply]]),t(s).errors.multiply?(l(),i("div",J,a(t(s).errors.multiply),1)):d("",!0)]),e("div",K,[e("label",Q,a(r.trans("Payment Instruction")),1),m(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=n=>t(s).comment=n),class:"input",maxlength:"1000",name:"comment"},null,512),[[u,t(s).comment]]),t(s).errors.comment?(l(),i("div",R,a(t(s).errors.comment),1)):d("",!0)]),e("div",W,[e("label",X,a(r.trans("Status")),1),m(e("select",{"onUpdate:modelValue":o[8]||(o[8]=n=>t(s).status=n),class:"input selectric",name:"status",id:"status"},[e("option",Y,a(r.trans("Active")),1),e("option",Z,a(r.trans("Deactivate")),1)],512),[[v,t(s).status]]),t(s).errors.status?(l(),i("div",ee,a(t(s).errors.status),1)):d("",!0)]),e("div",se,[b(g,{processing:t(s).processing},null,8,["processing"])])])])],32)])])]))}});export{ue as default};
