import{S as N,i as S,s as j,e as x,a as _,C as g,k as b,H as A,b as T,g as r,u as k,y as F,ag as d,o as G,p as v,r as H,t as p,A as C,a6 as E,K as z,E as K,F as B,f as I,m as J,G as L,q as M,c as O,h as P,j as Q}from"./vendor.906e418a.js";/* empty css                                            */import{d as D}from"./utils.87255a78.js";function R(n){let e,l,s;return{c(){e=T("input"),r(e,"type","text"),r(e,"class","input-text w-full rounded box-border p-2 focus:outline-none appearance-none svelte-zgi98y"),e.value=n[0],r(e,"placeholder",n[3]),r(e,"theme",n[1]),r(e,"style",n[4])},m(t,a){_(t,e,a),l||(s=[k(e,"input",n[5]),k(e,"keypress",n[6])],l=!0)},p(t,a){a&1&&e.value!==t[0]&&(e.value=t[0]),a&8&&r(e,"placeholder",t[3]),a&2&&r(e,"theme",t[1]),a&16&&r(e,"style",t[4])},d(t){t&&b(e),l=!1,F(s)}}}function U(n){let e,l,s;return{c(){e=T("textarea"),r(e,"class","input-text w-full rounded box-border p-2 focus:outline-none appearance-none svelte-zgi98y"),e.value=n[0],r(e,"placeholder",n[3]),r(e,"theme",n[1]),r(e,"style",n[4])},m(t,a){_(t,e,a),l||(s=k(e,"input",n[5]),l=!0)},p(t,a){a&1&&(e.value=t[0]),a&8&&r(e,"placeholder",t[3]),a&2&&r(e,"theme",t[1]),a&16&&r(e,"style",t[4])},d(t){t&&b(e),l=!1,s()}}}function V(n){let e;function l(a,i){return a[2]>1?U:R}let s=l(n),t=s(n);return{c(){t.c(),e=x()},m(a,i){t.m(a,i),_(a,e,i)},p(a,[i]){s===(s=l(a))&&t?t.p(a,i):(t.d(1),t=s(a),t&&(t.c(),t.m(e.parentNode,e)))},i:g,o:g,d(a){t.d(a),a&&b(e)}}}function W(n,e,l){let{value:s=""}=e,{theme:t="default"}=e,{lines:a=1}=e,{placeholder:i=""}=e,{style:c=""}=e;const u=A();function h(f){var q;l(0,s=f.target.value),u("change",(q=f==null?void 0:f.target)==null?void 0:q.value)}function m(f){f.key==="Enter"&&a===1&&(f.preventDefault(),u("submit"))}const y=D(h,300),o=D(m,300);return n.$$set=f=>{"value"in f&&l(0,s=f.value),"theme"in f&&l(1,t=f.theme),"lines"in f&&l(2,a=f.lines),"placeholder"in f&&l(3,i=f.placeholder),"style"in f&&l(4,c=f.style)},[s,t,a,i,c,y,o]}class X extends N{constructor(e){super();S(this,e,W,V,j,{value:0,theme:1,lines:2,placeholder:3,style:4})}}function Y(n){let e,l,s;function t(i){n[6](i)}let a={theme:n[1],style:n[2],lines:n[3],placeholder:n[4]};return n[0]!==void 0&&(a.value=n[0]),e=new X({props:a}),K.push(()=>B(e,"value",t)),e.$on("change",n[7]),e.$on("submit",n[8]),{c(){I(e.$$.fragment)},m(i,c){J(e,i,c),s=!0},p(i,c){const u={};c&2&&(u.theme=i[1]),c&4&&(u.style=i[2]),c&8&&(u.lines=i[3]),c&16&&(u.placeholder=i[4]),!l&&c&1&&(l=!0,u.value=i[0],L(()=>l=!1)),e.$set(u)},i(i){s||(p(e.$$.fragment,i),s=!0)},o(i){v(e.$$.fragment,i),s=!1},d(i){M(e,i)}}}function Z(n){let e,l;return{c(){e=T("div"),l=O(n[0]),r(e,"class","output-text w-full bg-white dark:bg-gray-800 rounded box-border p-2 whitespace-pre-wrap svelte-7lqb9h"),r(e,"theme",n[1]),r(e,"style",n[2])},m(s,t){_(s,e,t),P(e,l)},p(s,t){t&1&&Q(l,s[0]),t&2&&r(e,"theme",s[1]),t&4&&r(e,"style",s[2])},i:g,o:g,d(s){s&&b(e)}}}function w(n){let e,l,s,t;const a=[Z,Y],i=[];function c(u,h){return u[5]==="static"?0:1}return e=c(n),l=i[e]=a[e](n),{c(){l.c(),s=x()},m(u,h){i[e].m(u,h),_(u,s,h),t=!0},p(u,[h]){let m=e;e=c(u),e===m?i[e].p(u,h):(G(),v(i[m],1,1,()=>{i[m]=null}),H(),l=i[e],l?l.p(u,h):(l=i[e]=a[e](u),l.c()),p(l,1),l.m(s.parentNode,s))},i(u){t||(p(l),t=!0)},o(u){v(l),t=!1},d(u){i[e].d(u),u&&b(s)}}}function $(n,e,l){let{value:s=" "}=e,{theme:t}=e,{style:a=""}=e,{lines:i}=e,{placeholder:c=""}=e,{mode:u}=e;e.default_value&&(s=e.default_value);function h(o){s=o,l(0,s)}function m(o){z.call(this,n,o)}function y(o){z.call(this,n,o)}return n.$$set=o=>{l(9,e=C(C({},e),E(o))),"value"in o&&l(0,s=o.value),"theme"in o&&l(1,t=o.theme),"style"in o&&l(2,a=o.style),"lines"in o&&l(3,i=o.lines),"placeholder"in o&&l(4,c=o.placeholder),"mode"in o&&l(5,u=o.mode)},e=E(e),[s,t,a,i,c,u,h,m,y]}class ee extends N{constructor(e){super();S(this,e,$,w,j,{value:0,theme:1,style:2,lines:3,placeholder:4,mode:5})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),d()}get theme(){return this.$$.ctx[1]}set theme(e){this.$$set({theme:e}),d()}get style(){return this.$$.ctx[2]}set style(e){this.$$set({style:e}),d()}get lines(){return this.$$.ctx[3]}set lines(e){this.$$set({lines:e}),d()}get placeholder(){return this.$$.ctx[4]}set placeholder(e){this.$$set({placeholder:e}),d()}get mode(){return this.$$.ctx[5]}set mode(e){this.$$set({mode:e}),d()}}var se=ee;const ae=["static","dynamic"];export{se as Component,ae as modes};
