import m from"./PhoneNotification-4e1dec3c.js";import{d as v,r as g,w as b,i as f,h as S,C as M,_ as y,f as C,a as n,c as t,b as s,F as N,l as w,t as p,g as k}from"./index-b1308428.js";import{b as h}from"./bluetooth_disabled-b2ae7768.js";const B="/assets/usb_disabled-467dd84d.svg",u="/assets/phone_lock-b885e81c.svg",A="/assets/mobile_disabled-f3ad3577.svg",_="/assets/notifications_off-751622c7.svg",D=v({components:{PhoneNotification:m},setup(){const e=g(f("phoneStore")),a=g(f("settingsStore")),c=new Map([["disconnected",{message:"Connect an android device via USB and enable USB debugging to see notifications!",icon:B}],["locked",{message:"Unlock your android device to see notifications!",icon:u}],["untrusted",{message:"Always allow USB debugging from this machine to see notifications!",icon:u}],["no-notifications",{message:"Awaiting new Android notifications...",icon:_}]]),d=new Map([["bluetooth-disabled",{message:"Enable Bluetooth and connect an iOS device to see notifications!",icon:h}],["disconnected",{message:"Connect an iOS device via bluetooth to see notifications!",icon:h}],["no-notifications",{message:"Awaiting new iOS notifications...",icon:_}]]),r=i=>{switch(e.value.type){case"android":{const o=c.get(i);if(o)return o;console.error("Failed to get Android message based on state!")}case"ios":{const o=d.get(i);if(o)return o;console.error("Failed to get iOS message based on state!")}default:return console.error(`Invalid phone type "${e.value.type}"! Returning default not connected.`),{message:"Connect a device to see notifications!",icon:A}}};return b(a,()=>{S("not-connected-icon",M.SECONDARY_LUMIN)},{deep:!0}),{phoneStore:e,getNotConnectedMessage:r}}});const O={key:0,class:"phone-container"},P={id:"notification-list"},U={key:1,class:"phone-container",id:"no-show"},$={key:0,id:"not-connected-container"},F={id:"not-connected-icon-container"},I=["src"],L={key:1,id:"no-notifs-container"},E={id:"no-notifs-icon-container"},V=["src"];function R(e,a,c,d,r,i){const o=C("PhoneNotification");return n(),t("div",null,[e.phoneStore.state=="connected"&&e.phoneStore.notifications.length>0?(n(),t("div",O,[s("div",P,[(n(!0),t(N,null,w(e.phoneStore.notifications,l=>(n(),t("div",{key:l.id},[k(o,{notification:l},null,8,["notification"])]))),128))])])):(n(),t("div",U,[e.phoneStore.state!="connected"?(n(),t("div",$,[s("div",F,[s("img",{class:"not-connected-icon",src:e.getNotConnectedMessage(e.phoneStore.state).icon},null,8,I)]),s("p",null,p(e.getNotConnectedMessage(e.phoneStore.state).message),1)])):(n(),t("div",L,[s("div",E,[s("img",{class:"no-notifs-icon",src:e.getNotConnectedMessage("no-notifications").icon},null,8,V)]),s("p",null,p(e.getNotConnectedMessage("no-notifications").message),1)]))]))])}const z=y(D,[["render",R],["__scopeId","data-v-a5f02cd8"]]);export{z as default};
