Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Broadcast-d00eaca3.js

import{r as y,T as b,h as g,f as V,o as n,a as s,t as d,u as r,c,e as l,n as p,b as w,g as k}from"./app-43851608.js";import x from"./App-2fea9171.js";import{_ as u}from"./FormInput-4a309017.js";import{_ as $}from"./FormSelect-2d73589a.js";import"./App-ad5f7ecb.js";import"./Sidebar-7bb6d772.js";import"./Menu-4221d61f.js";import"./ProfileModal-628e5b7c.js";import"./LangToggle-8d05b0dc.js";import"./MobileSidebar-b73cd192.js";import"./index-99011d5f.js";/* empty css              */import"./Sidebar-7b5bc85b.js";import"./index-17cd980e.js";import"./use-text-value-242aa4d7.js";import"./ChevronUpDownIcon-8859f144.js";const B={class:"text-xl mb-1"},C={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},A=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})],-1),P={class:"ml-1 mt-1"},U={class:"space-y-12"},Z={class:"pb-12"},j={key:0,class:"grid gap-6 grid-cols-2 pb-10 border-b md:w-2/3"},M={class:"mt-6 flex items-center justify-end gap-x-6 md:w-2/3"},N={type:"button",class:"text-sm leading-6 text-gray-900"},S=["disabled"],T={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},q=s("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"},null,-1),z=s("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[s("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})],-1),D=[q,z],E={key:1},se={__name:"Broadcast",props:{config:{type:Object,required:!0}},setup(_){const h=_,i=a=>{const t=h.config.find(o=>o.key===a);return t?t.value:""},m=y(!1),e=b({broadcast_driver:i("broadcast_driver"),pusher_app_key:i("pusher_app_key"),pusher_app_id:i("pusher_app_id"),pusher_app_secret:i("pusher_app_secret"),pusher_app_cluster:i("pusher_app_cluster")}),f=[{label:"Pusher",value:"pusher"}],v=async()=>{e.put("/admin/settings?type=broadcast",{preserveScroll:!0})};return(a,t)=>(n(),g(x,null,{default:V(()=>[s("div",null,[s("h2",B,d(a.$t("Broadcast drivers")),1),s("p",C,[A,s("span",P,d(a.$t("Configure your broadcast drivers for realtime chat notifications")),1)])]),s("form",{onSubmit:t[5]||(t[5]=k(o=>v(),["prevent"]))},[s("div",U,[s("div",Z,[r(e).broadcast_driver==="pusher"?(n(),c("div",j,[l($,{modelValue:r(e).broadcast_driver,"onUpdate:modelValue":t[0]||(t[0]=o=>r(e).broadcast_driver=o),name:a.$t("Broadcast driver"),type:"text",options:f,error:r(e).errors.broadcast_driver,class:p("col-span-2")},null,8,["modelValue","name","error"]),l(u,{modelValue:r(e).pusher_app_id,"onUpdate:modelValue":t[1]||(t[1]=o=>r(e).pusher_app_id=o),name:a.$t("Pusher app id"),type:"text",error:r(e).errors.pusher_app_id,class:p("col-span-1")},null,8,["modelValue","name","error"]),l(u,{modelValue:r(e).pusher_app_key,"onUpdate:modelValue":t[2]||(t[2]=o=>r(e).pusher_app_key=o),name:a.$t("Pusher app key"),type:"text",error:r(e).errors.pusher_app_key,class:p("col-span-1")},null,8,["modelValue","name","error"]),l(u,{modelValue:r(e).pusher_app_secret,"onUpdate:modelValue":t[3]||(t[3]=o=>r(e).pusher_app_secret=o),name:a.$t("Pusher app secret"),type:"password",error:r(e).errors.pusher_app_secret,class:p("col-span-1")},null,8,["modelValue","name","error"]),l(u,{modelValue:r(e).pusher_app_cluster,"onUpdate:modelValue":t[4]||(t[4]=o=>r(e).pusher_app_cluster=o),name:a.$t("Pusher app cluster"),type:"text",error:r(e).errors.pusher_app_cluster,class:p("col-span-1")},null,8,["modelValue","name","error"])])):w("",!0),s("div",M,[s("button",N,d(a.$t("Cancel")),1),s("button",{class:p(["inline-flex justify-center rounded-md border border-transparent bg-primary px-4 py-2 text-sm text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",{"opacity-50":m.value}]),disabled:m.value},[m.value?(n(),c("svg",T,D)):(n(),c("span",E,d(a.$t("Save")),1))],10,S)])])])],32)]),_:1}))}};export{se as default};