text: import{A as t,S as s,i as a,s as e,B as n,z as r,a as c,C as o,D as d,g as l,E as i,j as p,G as $,J as f,F as u,H as m,f as h,m as g,o as x,I as D,q as y,N as v,e as E,t as b,c as C,b as H,d as w,k as P,n as B,u as I,h as S,v as N,x as U}from"./client.877fc7f9.js";function V(t){let s,a;return{c(){s=E("div"),a=b("No USB dhcp.txt found.")},l(t){s=C(t,"DIV",{});var e=H(s);a=w(e,"No USB dhcp.txt found."),e.forEach(h)},m(t,e){p(t,s,e),P(s,a)},p:B,i:B,o:B,d(t){t&&h(s)}}}function j(t){let s,a,e,n,o,f,g,x,D;return x=new I({props:{a:{grow:!0},$$slots:{default:[F]},$$scope:{ctx:t}}}),x.$on("click",t[2]),{c(){s=E("div"),a=b("Found USB dhcp.txt:"),e=c(),n=E("div"),o=b(t[0]),f=c(),g=E("div"),r(x.$$.fragment),this.h()},l(r){s=C(r,"DIV",{class:!0});var c=H(s);a=w(c,"Found USB dhcp.txt:"),c.forEach(h),e=l(r),n=C(r,"DIV",{class:!0,style:!0});var i=H(n);o=w(i,t[0]),i.forEach(h),f=l(r),g=C(r,"DIV",{class:!0});var p=H(g);d(x.$$.fragment,p),p.forEach(h),this.h()},h(){S(s,"class","plr06"),S(n,"class","terminal plr1 ptb04 "),N(n,"white-space","pre"),S(g,"class","grow flex plr06 pb06")},m(t,r){p(t,s,r),P(s,a),p(t,e,r),p(t,n,r),P(n,o),p(t,f,r),p(t,g,r),i(x,g,null),D=!0},p(t,s){(!D||1&s)&&U(o,t[0]);const a={};130&s&&(a.$$scope={dirty:s,ctx:t}),x.$set(a)},i(t){D||(u(x.$$.fragment,t),D=!0)},o(t){$(x.$$.fragment,t),D=!1},d(t){t&&h(s),t&&h(e),t&&h(n),t&&h(f),t&&h(g),m(x)}}}function F(t){let s,a=t[1]?"Disable DHCP Edit":"Enable DHCP Edit";return{c(){s=b(a)},l(t){s=w(t,a)},m(t,a){p(t,s,a)},p(t,e){2&e&&a!==(a=t[1]?"Disable DHCP Edit":"Enable DHCP Edit")&&U(s,a)},d(t){t&&h(s)}}}function k(t){let s,a,e,g,x,y;s=new n({});const v=[j,V],E=[];function b(t,s){return t[0]?0:1}return e=b(t),g=E[e]=v[e](t),{c(){r(s.$$.fragment),a=c(),g.c(),x=o()},l(t){d(s.$$.fragment,t),a=l(t),g.l(t),x=o()},m(t,n){i(s,t,n),p(t,a,n),E[e].m(t,n),p(t,x,n),y=!0},p(t,[s]){let a=e;e=b(t),e===a?E[e].p(t,s):(D(),$(E[a],1,1,()=>{E[a]=null}),f(),g=E[e],g||(g=E[e]=v[e](t),g.c()),u(g,1),g.m(x.parentNode,x))},i(t){y||(u(s.$$.fragment,t),u(g),y=!0)},o(t){$(s.$$.fragment,t),$(g),y=!1},d(t){m(s,t),t&&h(a),E[e].d(t),t&&h(x)}}}async function R(s,a){return t(s,a,this)}function q(t,s,a){const{page:e}=g();let n,r,c,o,{data:d}=s;return x(async()=>{console.log(d,d)}),t.$$set=t=>{"data"in t&&a(3,d=t.data)},t.$$.update=()=>{8&t.$$.dirty&&a(0,n=d.txt),8&t.$$.dirty&&a(4,r=d.config),1&t.$$.dirty&&a(5,c="\n\n# ---------- auto-generated from pdac -------- >>>>\n"+n+"\n# <<<<< ---- auto-generated from pdac -------------\n\n"),48&t.$$.dirty&&a(1,o=-1!=r.indexOf(c))},[n,o,function(t){y.set({type:"wait",message:"Restarting DHCP service"});const s=o?r.replace(c,""):r+c;v.post("/system/dhcp?as=json",{blob:s}).then(t=>{console.log("[dhcp.svelte] restarted:",t),y.set({type:"success",message:"DHCP Restarted"})}).catch(t=>{y.set({type:"error",...t.response.data})})},d]}export default class extends s{constructor(t){super(),a(this,t,q,k,e,{data:3})}}export{R as preload};
  