import{u as M}from"./widget-jbnupkVY.js";import{b as i,d as u,f as j}from"./app-QjDgb7aF.js";import{M as D}from"./MkContainer-CNBcUt5w.js";import{X as H}from"./MkTimeline-BHgihgS6.js";import{b as S,g,i as b,t as $,u as e,q as r,p as l,H as z,D as I,x as N,a as T,j as s}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";import"./MkNotes-DrVlMmnc.js";import"./MkNote-RPFbRjy2.js";import"./MkReactionsViewer-D75lmVQ0.js";import"./MkReactionIcon.vue_vue_type_script_setup_true_lang-D23mNn1N.js";import"./share-available-Drgr3YiT.js";import"./get-note-summary-DlGmePWF.js";import"./MkDateSeparatedList.vue_vue_type_style_index_0_lang-87CjANkN.js";import"./MkPagination-DzUgufpZ.js";const V={key:0,class:"ph-house ph-bold ph-lg"},X={key:1,class:"ph-chats-circle ph-bold ph-lg"},q={key:2,class:"ph-share-network ph-bold ph-lg"},E={key:3,class:"ph-planet ph-bold ph-lg"},O={key:4,class:"ph-list-bullets ph-bold ph-lg"},W={key:5,class:"ph-television ph-bold ph-lg"},A={style:{"margin-left":"8px"}},_="timeline",at=S({__name:"timeline",props:{widget:{}},emits:["updateProps"],setup(f,{expose:y,emit:k}){const w={showHeader:{type:"boolean",default:!0},height:{type:"number",default:300},src:{type:"string",default:"home",hidden:!0},antenna:{type:"object",default:null,hidden:!0},list:{type:"object",default:null,hidden:!0}},p=f,x=k,{widgetProps:t,configure:v,save:C}=M(_,w,p,x),c=T(!1),n=a=>{t.src=a,C()},P=async a=>{c.value=!0;const[h,B]=await Promise.all([u("antennas/list"),u("users/lists/list")]),d=h.map(o=>({text:o.name,icon:"ph-flying-saucer ph-bold ph-lg",action:()=>{t.antenna=o,n("antenna")}})),m=B.map(o=>({text:o.name,icon:"ph-list-bullets ph-bold ph-lg",action:()=>{t.list=o,n("list")}}));j([{text:i.ts._timelines.home,icon:"ph-house ph-bold ph-lg",action:()=>{n("home")}},{text:i.ts._timelines.local,icon:"ph-chats-teardrop ph-bold ph-lg",action:()=>{n("local")}},{text:i.ts._timelines.social,icon:"ph-share-network ph-bold ph-lg",action:()=>{n("social")}},{text:i.ts._timelines.global,icon:"ph-planet ph-bold ph-lg",action:()=>{n("global")}},d.length>0?null:void 0,...d,m.length>0?null:void 0,...m],a.currentTarget??a.target).then(()=>{c.value=!1})};return y({name:_,configure:v,id:p.widget?p.widget.id:null}),(a,h)=>(s(),g(D,{"show-header":e(t).showHeader,style:$(`height: ${e(t).height}px;`),scrollable:!0,class:"mkw-timeline"},{header:b(()=>[r("button",{class:"_button",onClick:P},[e(t).src==="home"?(s(),l("i",V)):e(t).src==="local"?(s(),l("i",X)):e(t).src==="social"?(s(),l("i",q)):e(t).src==="global"?(s(),l("i",E)):e(t).src==="list"?(s(),l("i",O)):e(t).src==="antenna"?(s(),l("i",W)):z("",!0),r("span",A,I(e(t).src==="list"?e(t).list.name:e(t).src==="antenna"?e(t).antenna.name:e(i).t("_timelines."+e(t).src)),1),r("i",{class:N(c.value?"ph-caret-up ph-bold ph-lg":"ph-caret-down ph-bold ph-lg"),style:{"margin-left":"8px"}},null,2)])]),default:b(()=>[r("div",null,[(s(),g(H,{key:e(t).src==="list"?`list:${e(t).list.id}`:e(t).src==="antenna"?`antenna:${e(t).antenna.id}`:e(t).src,src:e(t).src,list:e(t).list?e(t).list.id:null,antenna:e(t).antenna?e(t).antenna.id:null},null,8,["src","list","antenna"]))])]),_:1},8,["show-header","style"]))}});export{at as default};
//# sourceMappingURL=timeline-BmEE1toi.js.map
