/* empty css             *//* empty css                  *//* empty css                          *//* empty css                    */import{d as e,m as a,p as l,O as s,x as t,o as u,c as i,e as o,X as n,aS as r,f as d,a7 as p,l as c,w as m,b as _,z as v,a as h,F as f,y as x,t as w,a5 as g,$ as y,aT as j,U as b,_ as k}from"./index-0ffeeea6.js";import{w as V}from"./index-5ea39eae.js";/* empty css                 *//* empty css                   */import"./http-ffb58baa.js";/* empty css                 *//* empty css                   */const C={class:"flex flex-col w-full"},B={class:"wrapper"},U={class:"wrapper-inner"},q={key:0,class:"flex justify-end w-full"},S=k(e({__name:"configPublicPlus",props:{primary:null,isShowButton:{type:Boolean,default:!0},required:{type:Boolean,default:!1}},emits:["close","success","change"],setup(e,{emit:k}){var S;const z=e,I=a({wx_auth_ids:[]}),P=a("");let $=a([]);const F=l((()=>$.value.filter((e=>e.nick_name.includes(P.value)))));s((()=>I.value.wx_auth_ids),((e,a)=>{k("change",I.value.wx_auth_ids)}),{immediate:!0,deep:!0});const H=l((()=>{var e,a,l,s;return(null==(a=null==(e=I.value)?void 0:e.wx_auth_ids)?void 0:a.length)>0&&(null==(s=null==(l=I.value)?void 0:l.wx_auth_ids)?void 0:s.length)==$.value.length})),O=()=>{},T=e=>{var a;I.value.wx_auth_ids=e?null==(a=F.value)?void 0:a.map((e=>e.id)):[],I.value.wx_auth_ids},X=e=>{},A=()=>{const e=I.value.wx_auth_ids;if(z.required&&e.length<=0)return g.error("请选择公众号");k("success",e)};return z.primary&&(I.value.wx_auth_ids=null==(S=z.primary)?void 0:S.gzh_ids_arr,z.primary,I.value),t((()=>{V({is_export:!0}).then((e=>{$.value=e.data}))})),(e,a)=>{const l=y,s=j,t=b;return u(),i("div",C,[o("div",B,[n(o("input",{class:"filter-input","onUpdate:modelValue":a[0]||(a[0]=e=>p(P)?P.value=e:null),clearable:"",placeholder:"请输入公众号名称",onChange:O},null,544),[[r,d(P)]]),o("div",U,[d(F).length>0?(u(),c(l,{key:0,modelValue:d(H),"onUpdate:modelValue":a[1]||(a[1]=e=>p(H)?H.value=e:null),onChange:T},{default:m((()=>[_("全选")])),_:1},8,["modelValue"])):v("",!0),h(s,{modelValue:d(I).wx_auth_ids,"onUpdate:modelValue":a[2]||(a[2]=e=>d(I).wx_auth_ids=e),onChange:X,class:"flex flex-col"},{default:m((()=>[(u(!0),i(f,null,x(d(F),((e,a)=>(u(),c(l,{key:a,label:e.id},{default:m((()=>[_(w(e.nick_name),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue"])])]),z.isShowButton?(u(),i("div",q,[h(t,{type:"primary",onClick:A},{default:m((()=>[_(w(e.$t("system.confirm")),1)])),_:1})])):v("",!0)])}}}),[["__scopeId","data-v-69c082f8"]]);export{S as default};
