import './async-Djx13DAD.js';
import { d as attr_class, a as attr, g as attr_style, c as bind_props } from './index-B7gr0Dsc.js';
import { c } from './BlockTitle-CMSrY_fB.js';
import { w } from './IconButton-7VBZdgpA.js';
import './MarkdownCode.svelte_svelte_type_style_lang-DJRtJayx.js';
import { e } from './Check-THd8EJll.js';
import { h } from './Copy-DNPvPwdp.js';
import { M } from './Send-DqNOmoCe.js';
import { s } from './Square-DrWSae15.js';
import './2-CeYbpaU1.js';
import { y } from './IconButtonWrapper-DlgTGGi-.js';
import { e as escape_html } from './escaping-CBnpiEl5.js';

/* empty css                                     */function pt(y$1,v){y$1.component(a=>{let{value:s$1="",value_is_output:w$1=false,lines:k=1,placeholder:p="",label:z,info:C=void 0,disabled:c$1=false,show_label:d=true,container:T=true,max_lines:J=void 0,type:r="text",buttons:h$1=null,oncustombuttonclick:K=null,submit_btn:i=null,stop_btn:e$1=null,rtl:g=false,autofocus:n=false,text_align:b=void 0,autoscroll:L=true,max_length:m=void 0,html_attributes:o=null,validation_error:u=void 0,onchange:M$1,onsubmit:N,onstop:O,onblur:P,onselect:Q,oninput:R,onfocus:U,oncopy:I}=v,f=false,x,B=1;const S=!i;async function q(){"clipboard"in navigator&&(await navigator.clipboard.writeText(s$1),I?.({value:s$1}),W());}function W(){f=true,x&&clearTimeout(x),x=setTimeout(()=>{f=false;},1e3);}if(a.push(`<label${attr_class("svelte-1hguek3",void 0,{container:T,show_textbox_border:S})}>`),d&&h$1&&h$1.length>0?(a.push("<!--[-->"),y(a,{buttons:h$1,children:l=>{h$1.some(_=>typeof _=="string"&&_==="copy")?(l.push("<!--[-->"),w(l,{Icon:f?e:h,onclick:q,label:f?"Copied":"Copy"})):l.push("<!--[!-->"),l.push("<!--]-->");}})):a.push("<!--[!-->"),a.push("<!--]--> "),c(a,{show_label:u?true:d,info:C,children:l=>{l.push(`<!---->${escape_html(z)} `),u?(l.push("<!--[-->"),l.push(`<div class="validation-error svelte-1hguek3">${escape_html(u)}</div>`)):l.push("<!--[!-->"),l.push("<!--]-->");},$$slots:{default:true}}),a.push('<!----> <div class="input-container svelte-1hguek3">'),k===1&&B===1)a.push("<!--[-->"),r==="text"?(a.push("<!--[-->"),a.push(`<input data-testid="textbox" type="text"${attr_class("scroll-hide svelte-1hguek3",void 0,{"validation-error":u})}${attr("dir",g?"rtl":"ltr")}${attr("value",s$1)}${attr("placeholder",p)}${attr("disabled",c$1,true)}${attr("autofocus",n,true)}${attr("maxlength",m)}${attr_style(b?"text-align: "+b:"")}${attr("autocapitalize",o?.autocapitalize)}${attr("autocorrect",o?.autocorrect)}${attr("spellcheck",o?.spellcheck)}${attr("autocomplete",o?.autocomplete)}${attr("tabindex",o?.tabindex)}${attr("enterkeyhint",o?.enterkeyhint)}${attr("lang",o?.lang)}/>`)):(a.push("<!--[!-->"),r==="password"?(a.push("<!--[-->"),a.push(`<input data-testid="password" type="password"${attr_class("scroll-hide svelte-1hguek3",void 0,{"validation-error":u})}${attr("value",s$1)}${attr("placeholder",p)}${attr("disabled",c$1,true)}${attr("autofocus",n,true)}${attr("maxlength",m)} autocomplete=""${attr("autocapitalize",o?.autocapitalize)}${attr("autocorrect",o?.autocorrect)}${attr("spellcheck",o?.spellcheck)}${attr("tabindex",o?.tabindex)}${attr("enterkeyhint",o?.enterkeyhint)}${attr("lang",o?.lang)}/>`)):(a.push("<!--[!-->"),r==="email"?(a.push("<!--[-->"),a.push(`<input data-testid="textbox" type="email"${attr_class("scroll-hide svelte-1hguek3",void 0,{"validation-error":u})}${attr("value",s$1)}${attr("placeholder",p)}${attr("disabled",c$1,true)}${attr("autofocus",n,true)}${attr("maxlength",m)} autocomplete="email"${attr("autocapitalize",o?.autocapitalize)}${attr("autocorrect",o?.autocorrect)}${attr("spellcheck",o?.spellcheck)}${attr("tabindex",o?.tabindex)}${attr("enterkeyhint",o?.enterkeyhint)}${attr("lang",o?.lang)}/>`)):a.push("<!--[!-->"),a.push("<!--]-->")),a.push("<!--]-->")),a.push("<!--]-->");else {a.push("<!--[!-->"),a.push(`<textarea data-testid="textbox"${attr("dir",g?"rtl":"ltr")}${attr("placeholder",p)}${attr("rows",k)}${attr("disabled",c$1,true)}${attr("autofocus",n,true)}${attr("maxlength",m)}${attr_style(b?"text-align: "+b:"")}${attr("autocapitalize",o?.autocapitalize)}${attr("autocorrect",o?.autocorrect)}${attr("spellcheck",o?.spellcheck)}${attr("autocomplete",o?.autocomplete)}${attr("tabindex",o?.tabindex)}${attr("enterkeyhint",o?.enterkeyhint)}${attr("lang",o?.lang)}${attr_class("svelte-1hguek3",void 0,{"no-label":!d&&(i||e$1),"validation-error":u})}>`);const l=escape_html(s$1);l&&a.push(`${l}`),a.push("</textarea>");}a.push("<!--]--> "),i?(a.push("<!--[-->"),a.push(`<button${attr_class("submit-button svelte-1hguek3",void 0,{"padded-button":i!==true})}>`),i===true?(a.push("<!--[-->"),M(a)):(a.push("<!--[!-->"),a.push(`${escape_html(i)}`)),a.push("<!--]--></button>")):a.push("<!--[!-->"),a.push("<!--]--> "),e$1?(a.push("<!--[-->"),a.push(`<button${attr_class("stop-button svelte-1hguek3",void 0,{"padded-button":e$1!==true})}>`),e$1===true?(a.push("<!--[-->"),s(a,{fill:"none",stroke_width:2.5})):(a.push("<!--[!-->"),a.push(`${escape_html(e$1)}`)),a.push("<!--]--></button>")):a.push("<!--[!-->"),a.push("<!--]--></div></label>"),bind_props(v,{value:s$1,value_is_output:w$1});});}

export { pt as p };
//# sourceMappingURL=Textbox-BWLUCQsC.js.map
