import{i as x,r as w,g as $}from"./i18n-eTakDDhg.js";import{R as y,u as k,v as T,y as B,S,w as a,a as G,X as E,a5 as o,T as I,x as M,M as u,W as P}from"./index-BkylzejB.js";import{s as R}from"./clone-IGppQJ7B.js";import{T as W}from"./Textbox-BKaV3ERZ.js";import{S as X}from"./index-C-r_2iGV.js";import"./StreamingBar.svelte_svelte_type_style_lang-CFNH9sqm.js";import{B as j}from"./Block-Bl_3z_UU.js";import"./ScrollFade.svelte_svelte_type_style_lang-De9nUaYy.js";import{G as q}from"./utils.svelte-DZ62NrTu.js";import{default as mt}from"./Example-BAfuqEDm.js";import"./actions-CWv1ghz2.js";import"./input-l8ysRorr.js";import"./BlockTitle-BP9HXeKy.js";import"./Info-ElNnmNxB.js";import"./html-DvOIMrhY.js";import"./Check-8VzamX5F.js";import"./Copy-Dnm0QzA5.js";import"./Send-ChW5puPB.js";import"./Square-oaGskVQb.js";import"./IconButtonWrapper-33oacT7w.js";import"./snippet-CC9u6I34.js";import"./Clear-Daql2pLY.js";import"./index-B_pwUImq.js";import"./size-oyICZHuE.js";/* empty css                                              */var z=P("<!> <!>",1);function ut(d,p){y(p,!0);let c=w(p,["$$slots","$$events","$$legacy"]);const t=new q(c);let m=o(()=>t.shared.label||"Textbox");t.props.value=t.props.value??"";let n=k(T(t.props.value));async function h(){a(n)!==t.props.value&&(M(n,t.props.value,!0),await u(),t.dispatch("change",R(t.props.value)))}async function _(e){!t.shared||!t.props||(t.props.validation_error=null,t.props.value=e,await u(),t.dispatch("input"))}B(()=>{h()});function g(e){!t.shared||!t.props||(t.props.validation_error=null,t.props.value=e)}j(d,{get visible(){return t.shared.visible},get elem_id(){return t.shared.elem_id},get elem_classes(){return t.shared.elem_classes},get scale(){return t.shared.scale},get min_width(){return t.shared.min_width},allow_overflow:!1,get padding(){return t.shared.container},get rtl(){return t.props.rtl},children:(e,A)=>{var i=z(),l=S(i);{var f=s=>{X(s,$({get autoscroll(){return t.shared.autoscroll},get i18n(){return t.i18n}},()=>t.shared.loading_status,{show_validation_error:!1,on_clear_status:()=>t.dispatch("clear_status",t.shared.loading_status)}))};x(l,s=>{t.shared.loading_status&&s(f)})}var v=E(l,2);{let s=o(()=>t.shared?.loading_status?.validation_error||t.shared?.validation_error),b=o(()=>!t.shared.interactive);W(v,{get label(){return a(m)},get info(){return t.props.info},get show_label(){return t.shared.show_label},get lines(){return t.props.lines},get type(){return t.props.type},get rtl(){return t.props.rtl},get text_align(){return t.props.text_align},get max_lines(){return t.props.max_lines},get placeholder(){return t.props.placeholder},get submit_btn(){return t.props.submit_btn},get stop_btn(){return t.props.stop_btn},get buttons(){return t.props.buttons},get autofocus(){return t.props.autofocus},get container(){return t.shared.container},get autoscroll(){return t.shared.autoscroll},get max_length(){return t.props.max_length},get html_attributes(){return t.props.html_attributes},get validation_error(){return a(s)},onchange:g,oninput:_,onsubmit:()=>{t.shared.validation_error=null,t.dispatch("submit")},onblur:()=>t.dispatch("blur"),onselect:r=>t.dispatch("select",r),onfocus:()=>t.dispatch("focus"),onstop:()=>t.dispatch("stop"),oncopy:r=>t.dispatch("copy",r),oncustombuttonclick:r=>{t.dispatch("custom_button_click",{id:r})},get disabled(){return a(b)},get value(){return t.props.value},set value(r){t.props.value=r}})}G(e,i)},$$slots:{default:!0}}),I()}export{mt as BaseExample,W as BaseTextbox,ut as default};
