import"./svelte/svelte_internal_flags_async.js";import*as t from"./svelte/svelte_internal_client.js";import"./i18n-CqG9A4Dp.js";import{G as w,c as _}from"./utils.svelte-kG009vb9.js";import x from"./HTML-Bf3k99jF.js";import{S as B}from"./StreamingBar-Hli-vaRZ.js";import{B as k,e as S,d as j,h as I}from"./ScrollFade-DGw40oqj.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.js";import{default as ae}from"./Example-DaRf_1sj.js";import"./svelte/svelte_store.js";import"./index-aMLoRFR_.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./MarkdownCode-VTUoaX6K.js";import"./prism-python-BRxZ6l4O.js";var L=t.from_html("<!> <!> <!> <div><!></div>",1);function te(m,a){t.push(a,!0);let h=t.rest_props(a,["$$slots","$$events","$$legacy"]);const e=new w(h);let g=t.derived(()=>({value:e.props.value||"",label:e.shared.label,visible:e.shared.visible,...e.props.props})),o=t.state(t.proxy(e.props.value));t.user_effect(()=>{JSON.stringify(t.get(o))!==JSON.stringify(e.props.value)&&(t.set(o,e.props.value,!0),e.dispatch("change"))});{let c=t.derived(()=>e.props.padding!==!1);k(m,{get visible(){return e.shared.visible},get elem_id(){return e.shared.elem_id},get elem_classes(){return e.shared.elem_classes},get container(){return e.shared.container},get padding(){return t.get(c)},overflow_behavior:"visible",children:(v,G)=>{var l=L(),i=t.first_child(l);{var f=s=>{S(s,{get buttons(){return e.props.buttons},on_custom_button_click:$=>{e.dispatch("custom_button_click",{id:$})}})};t.if(i,s=>{e.shared.show_label&&e.props.buttons&&e.props.buttons.length>0&&s(f)})}var p=t.sibling(i,2);{var b=s=>{j(s,{get Icon(){return I},get show_label(){return e.shared.show_label},get label(){return e.shared.label},float:!0})};t.if(p,s=>{e.shared.show_label&&s(b)})}var n=t.sibling(p,2);B(n,t.spread_props({get autoscroll(){return e.shared.autoscroll},get i18n(){return e.i18n}},()=>e.shared.loading_status,{variant:"center",on_clear_status:()=>e.dispatch("clear_status",loading_status)}));var r=t.sibling(n,2);let d,u;var y=t.child(r);x(y,{get props(){return t.get(g)},get html_template(){return e.props.html_template},get css_template(){return e.props.css_template},get js_on_load(){return e.props.js_on_load},get elem_classes(){return e.shared.elem_classes},get visible(){return e.shared.visible},get autoscroll(){return e.shared.autoscroll},get apply_default_css(){return e.props.apply_default_css},get component_class_name(){return e.props.component_class_name},$$events:{event:s=>{e.dispatch(s.detail.type,s.detail.data)},update_value:s=>{s.detail.property==="value"?e.props.value=s.detail.data:s.detail.property==="label"?e.shared.label=s.detail.data:s.detail.property==="visible"&&(e.shared.visible=s.detail.data)}}}),t.reset(r),t.template_effect(s=>{d=t.set_class(r,1,"html-container svelte-1jts93g",null,d,{pending:e.shared.loading_status?.status==="pending"&&e.shared.loading_status?.show_progress!=="hidden","label-padding":e.shared.show_label??void 0}),u=t.set_style(r,"",u,s)},[()=>({"min-height":e.props.min_height&&e.shared.loading_status?.status!=="pending"?_(e.props.min_height):void 0,"max-height":e.props.max_height?_(e.props.max_height):void 0,"overflow-y":e.props.max_height?"auto":void 0})]),t.append(v,l)},$$slots:{default:!0}})}t.pop()}export{ae as BaseExample,x as BaseHTML,te as default};
