import{S as s,a,s as t,u as l,v as c,x as e,A as o,z as n,B as r,C as i,e as u,t as p,b as h,c as f,d,h as m,g as v,f as E,j as $,k as b,l as g,p as P,r as I,q as k,D as x,L as y,a5 as D,P as S,aq as w}from"./client.74245462.js";function H(s){let a;const t=new y({props:{icon:D,spin:!0,class:"icon"}});return{c(){l(t.$$.fragment)},l(s){c(t.$$.fragment,s)},m(s,l){e(t,s,l),a=!0},p:o,i(s){a||(n(t.$$.fragment,s),a=!0)},o(s){r(t.$$.fragment,s),a=!1},d(s){i(t,s)}}}function V(s){let a,t,l,c,e,o,i,y,D,w,V,C,j,q,A,B,N,T,U,z,L,R,F,G,J,K,M,O,Q=s[2]&&H();return{c(){a=u("h1"),t=p("Settings"),l=h(),c=u("br"),e=h(),o=u("h2"),i=p("Snapcast server"),y=h(),D=u("div"),w=u("div"),V=u("p"),C=p("Hostname:"),j=h(),q=u("input"),A=h(),B=u("div"),N=u("p"),T=p("Port:"),U=h(),z=u("input"),L=h(),R=u("div"),F=u("a"),G=p("Connect"),K=h(),Q&&Q.c(),this.h()},l(s){a=f(s,"H1",{class:!0});var n=d(a);t=m(n,"Settings"),n.forEach(v),l=E(s),c=f(s,"BR",{}),e=E(s),o=f(s,"H2",{class:!0});var r=d(o);i=m(r,"Snapcast server"),r.forEach(v),y=E(s),D=f(s,"DIV",{class:!0});var u=d(D);w=f(u,"DIV",{class:!0});var p=d(w);V=f(p,"P",{});var h=d(V);C=m(h,"Hostname:"),h.forEach(v),j=E(p),q=f(p,"INPUT",{class:!0,type:!0,placeholder:!0}),p.forEach(v),A=E(u),B=f(u,"DIV",{class:!0});var $=d(B);N=f($,"P",{});var b=d(N);T=m(b,"Port:"),b.forEach(v),U=E($),z=f($,"INPUT",{class:!0,type:!0,placeholder:!0}),$.forEach(v),L=E(u),R=f(u,"DIV",{class:!0});var g=d(R);F=f(g,"A",{class:!0,href:!0});var P=d(F);G=m(P,"Connect"),P.forEach(v),K=E(g),Q&&Q.l(g),g.forEach(v),u.forEach(v),this.h()},h(){$(a,"class","title"),$(o,"class","subtitle"),$(q,"class","input is-rounded"),$(q,"type","text"),$(q,"placeholder","host:port"),$(w,"class","column is-12-mobile is-6-desktop"),$(z,"class","input is-rounded"),$(z,"type","text"),$(z,"placeholder","host:port"),$(B,"class","column is-12-mobile is-6-desktop"),$(F,"class","button"),$(F,"href",J=null),$(R,"class","column is-6-mobile is-3-desktop"),$(D,"class","columns is-multiline")},m(n,r,u){b(n,a,r),g(a,t),b(n,l,r),b(n,c,r),b(n,e,r),b(n,o,r),g(o,i),b(n,y,r),b(n,D,r),g(D,w),g(w,V),g(V,C),g(w,j),g(w,q),P(q,s[0]),g(D,A),g(D,B),g(B,N),g(N,T),g(B,U),g(B,z),P(z,s[1]),g(D,L),g(D,R),g(R,F),g(F,G),g(R,K),Q&&Q.m(R,null),M=!0,u&&I(O),O=[k(q,"input",s[4]),k(z,"input",s[5]),k(F,"click",s[3])]},p(s,[a]){1&a&&q.value!==s[0]&&P(q,s[0]),2&a&&z.value!==s[1]&&P(z,s[1]),s[2]?Q?(Q.p(s,a),n(Q,1)):((Q=H()).c(),n(Q,1),Q.m(R,null)):Q&&(S(),r(Q,1,1,()=>{Q=null}),x())},i(s){M||(n(Q),M=!0)},o(s){r(Q),M=!1},d(s){s&&v(a),s&&v(l),s&&v(c),s&&v(e),s&&v(o),s&&v(y),s&&v(D),Q&&Q.d(),I(O)}}}function C(s,a,t){let l,c=window.location.hostname,e="1780";return[c,e,l,async()=>{t(2,l=!0),await w({host:c,port:e}),t(2,l=!1)},function(){c=this.value,t(0,c)},function(){e=this.value,t(1,e)}]}export default class extends s{constructor(s){super(),a(this,s,C,V,t,{})}}
