1import{d as P,u as R,L,V as b,i as I,s as T,p as n,w as p,_ as $,l as i,A as D,q as t,aV as H,n as M,m as l,r as _,D as X,z as q,X as z,E as G,a0 as O}from"./BzxC8KJp.js";import{_ as Q}from"./CAMzIL1k.js";import{_ as j}from"./BQM61A45.js";import{_ as F}from"./v_99mJrD.js";import{_ as J}from"./B5_OTxdO.js";import{_ as K}from"./DOd9D7nS.js";import{_ as W}from"./CUdexicG.js";import{u as Y}from"./DPK_h1Z2.js";import{u as Z}from"./BtgP3dOy.js";import"./1f3OzMap.js";import"./DNJ4LG_p.js";import"./tw9alNjz.js";import"./CpMUN48E.js";import"./CDpYMxG4.js";import"./6gwGMGmg.js";import"./BViHOCX-.js";import"./0SUhVydU.js";import"./M7yylYfn.js";import"./_UwMI-mw.js";import"./DmAOUkSl.js";import"./D16AwjDh.js";import"./BN5uA10b.js";import"./C-QV0ww0.js";import"./05NQ1WGd.js";import"./BWRE2ksi.js";import"./DTfK50KV.js";const tt={class:"tw-w-full"},Ut=P({name:"ActiveAdCampaignsPage",__name:"campaigns",setup(et){R({title:"Active Advertising Campaigns"});const r=Y(),{filteredCampaigns:c}=L(r),f=()=>z.appendQueries("/api/services/app/SportseeAdmin/GetAdCampaigns?activeOnly=true",{}),{data:v,fetchError:u,refresh:C,loading:s,isPageReady:d,shouldShowErrorIndicator:x}=Z(f,!0,"EXTERNAL");b(()=>v,e=>{e.value?.campaigns?r.setCampaigns(e.value.campaigns):r.setCampaigns(null)},{immediate:!0,deep:!0});const m=I(()=>!c.value||s.value?[]:c.value),o=G(!1),A=e=>{O(`/admin/advertising/campaign/${e.campaign.id}`)};return(e,a)=>{const h=D,y=Q,k=j,E=H,S=F,w=X,V=J,U=K,B=W,N=$;return i(),T("div",null,[n(N,{name:"admin-layout"},{default:p(()=>[n(U,null,{default:p(()=>[n(k,{title:"Active Advertising <br/>Campaigns",subtitle:"Select an advertising campaign to view, or create a new one.",image:"/img/posts-admin-hero.svg"},{"action-buttons":p(()=>[n(h,{label:"Create Campaign",color:"deep-purple-5",style:{"min-width":"220px","margin-right":"8px"},onClick:a[0]||(a[0]=g=>o.value=!0)}),n(y,{onClick:t(C)},null,8,["onClick"])]),_:1}),n(E,{loading:t(s),text:"Retrieving advertisers...",error:t(u)},null,8,["loading","error"]),M("div",tt,[t(d)&&t(m).length>0?(i(),l(S,{key:0,campaigns:t(m),readonly:""},null,8,["campaigns"])):_("",!0),!t(s)&&t(d)&&t(m).length===0?(i(),l(w,{key:1,text:"No Campaigns Currently Active"})):_("",!0),t(x)?(i(),l(V,{key:2,text:t(u)},null,8,["text"])):_("",!0)])]),_:1}),n(B,{modelValue:t(o),"onUpdate:modelValue":a[1]||(a[1]=g=>q(o)?o.value=g:null),id:0,onSaved:A},null,8,["modelValue"])]),_:1})])}}});export{Ut as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.