import{d as p,T as u,c as O,o as A,a as s,t as o,x as c,l as i,v as _,u as l,A as d,b as S}from"./app-Do7K7VDV.js";import{_ as T}from"./AdminLayout-DeT_GLTC.js";import{_ as R}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 m={class:"space-y-6"},b={class:"grid grid-cols-1 lg:grid-cols-12"},v={class:"lg:col-span-5"},I={class:"lg:col-span-7"},L={class:"card"},B={class:"card-body"},C={class:"mb-2"},V={class:"label"},h={class:"mb-2"},D={class:"label"},M={value:"development"},f={value:"production"},g={class:"mb-2"},G={class:"label"},K={value:"true"},U={value:"false"},W={class:"mb-2"},P={class:"label"},y={value:"true"},X={value:"false"},q={class:"mb-2"},Y={class:"label"},F={class:"mb-2"},H={class:"label"},Q=["value"],w={class:"mb-2"},k={class:"label"},$={value:"error"},j={value:"warn"},z={value:"info"},J={value:"debug"},Z={class:"mb-2"},x={class:"label"},ss={class:"mb-2"},ts={class:"label"},es={class:"mb-2"},os={class:"label"},ls={class:"mb-2"},ns={class:"label"},as={class:"mb-2"},Es={class:"label"},is={class:"mt-3"},_s=p({layout:T}),cs=Object.assign(_s,{__name:"WaServer",props:["id","PORT","NODE_ENV","ENABLE_WEBHOOK","ENABLE_WEBSOCKET","BOT_NAME","DATABASE_URL","LOG_LEVEL","RECONNECT_INTERVAL","MAX_RECONNECT_RETRIES","SSE_MAX_QR_GENERATION","SESSION_CONFIG_ID","API_KEY"],setup(r){const E=r,t=u({PORT:E.PORT,NODE_ENV:E.NODE_ENV,ENABLE_WEBHOOK:E.ENABLE_WEBHOOK,ENABLE_WEBSOCKET:E.ENABLE_WEBSOCKET,BOT_NAME:E.BOT_NAME,DATABASE_URL:E.DATABASE_URL,LOG_LEVEL:E.LOG_LEVEL,RECONNECT_INTERVAL:E.RECONNECT_INTERVAL,MAX_RECONNECT_RETRIES:E.MAX_RECONNECT_RETRIES,SSE_MAX_QR_GENERATION:E.SSE_MAX_QR_GENERATION,SESSION_CONFIG_ID:E.SESSION_CONFIG_ID,API_KEY:E.API_KEY});function N(){t.put(route("admin.developer-settings.update",E.id))}return(e,n)=>(A(),O("div",m,[s("div",b,[s("div",v,[s("strong",null,o(e.trans("Whatsapp Server Settings")),1),s("p",null,o(e.trans("Edit Whatsapp Server settings")),1)]),s("div",I,[s("form",{onSubmit:c(N,["prevent"])},[s("div",L,[s("div",B,[s("div",C,[s("label",V,o(e.trans("PORT")),1),i(s("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=a=>l(t).PORT=a),class:"input",required:""},null,512),[[_,l(t).PORT]])]),s("div",h,[s("label",D,o(e.trans("NODE ENV")),1),i(s("select",{class:"select","onUpdate:modelValue":n[1]||(n[1]=a=>l(t).NODE_ENV=a)},[s("option",M,o(e.trans("Development")),1),s("option",f,o(e.trans("Production")),1)],512),[[d,l(t).NODE_ENV]])]),s("div",g,[s("label",G,o(e.trans("ENABLE WEBHOOK")),1),i(s("select",{class:"select","onUpdate:modelValue":n[2]||(n[2]=a=>l(t).ENABLE_WEBHOOK=a)},[s("option",K,o(e.trans("Yes")),1),s("option",U,o(e.trans("No")),1)],512),[[d,l(t).ENABLE_WEBHOOK]])]),s("div",W,[s("label",P,o(e.trans("ENABLE WEBSOCKET")),1),i(s("select",{class:"select","onUpdate:modelValue":n[3]||(n[3]=a=>l(t).ENABLE_WEBSOCKET=a)},[s("option",y,o(e.trans("Yes")),1),s("option",X,o(e.trans("No")),1)],512),[[d,l(t).ENABLE_WEBSOCKET]])]),s("div",q,[s("label",Y,o(e.trans("BOT NAME")),1),i(s("input",{type:"text","onUpdate:modelValue":n[4]||(n[4]=a=>l(t).BOT_NAME=a),required:"",class:"input"},null,512),[[_,l(t).BOT_NAME]])]),s("div",F,[s("label",H,o(e.trans("DATABASE URL")),1),s("input",{type:"text",disabled:"",value:l(t).DATABASE_URL,required:"",class:"input"},null,8,Q)]),s("div",w,[s("label",k,o(e.trans("LOG LEVEL")),1),i(s("select",{class:"select","onUpdate:modelValue":n[5]||(n[5]=a=>l(t).LOG_LEVEL=a)},[s("option",$,o(e.trans("Error")),1),s("option",j,o(e.trans("Warn")),1),s("option",z,o(e.trans("Info")),1),s("option",J,o(e.trans("Debug")),1)],512),[[d,l(t).LOG_LEVEL]])]),s("div",Z,[s("label",x,o(e.trans("RECONNECT INTERVAL")),1),i(s("input",{type:"text","onUpdate:modelValue":n[6]||(n[6]=a=>l(t).RECONNECT_INTERVAL=a),required:"",class:"input"},null,512),[[_,l(t).RECONNECT_INTERVAL]])]),s("div",ss,[s("label",ts,o(e.trans("MAX RECONNECT RETRIES")),1),i(s("input",{type:"text","onUpdate:modelValue":n[7]||(n[7]=a=>l(t).MAX_RECONNECT_RETRIES=a),required:"",class:"input"},null,512),[[_,l(t).MAX_RECONNECT_RETRIES]])]),s("div",es,[s("label",os,o(e.trans("SSE MAX QR GENERATION")),1),i(s("input",{type:"text","onUpdate:modelValue":n[8]||(n[8]=a=>l(t).SSE_MAX_QR_GENERATION=a),required:"",class:"input"},null,512),[[_,l(t).SSE_MAX_QR_GENERATION]])]),s("div",ls,[s("label",ns,o(e.trans("SESSION CONFIG ID")),1),i(s("input",{type:"text","onUpdate:modelValue":n[9]||(n[9]=a=>l(t).SESSION_CONFIG_ID=a),required:"",class:"input"},null,512),[[_,l(t).SESSION_CONFIG_ID]])]),s("div",as,[s("label",Es,o(e.trans("API KEY")),1),i(s("input",{type:"text","onUpdate:modelValue":n[10]||(n[10]=a=>l(t).API_KEY=a),required:"",class:"input"},null,512),[[_,l(t).API_KEY]])]),s("div",is,[S(R,{processing:l(t).processing,"btn-text":e.trans("Save Changes")},null,8,["processing","btn-text"])])])])],32)])])]))}});export{cs as default};
