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