import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import"./svelte/svelte_internal_flags_legacy.js";import{createEventDispatcher as g}from"./svelte/svelte_svelte.js";import{B as b}from"./IconButtonWrapper-D4LMIc_2.js";import"./i18n-CyvX8KmK.js";import{G as $}from"./utils.svelte-Ceck75cM.js";import{S as x}from"./StreamingBar-C6ky6DsM.js";import{B as y}from"./Index.svelte_svelte_type_style_lang-DXctW2-r.js";import"./MarkdownCode-C7jLnxqj.js";import"./index-Dw8Uzof1.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_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./prism-python-B1e-54E9.js";var B=e.from_html('<button><span class="svelte-e5lyqv"> </span> <span class="icon svelte-e5lyqv">▼</span></button> <div><!></div>',1);function k(c,r){e.push(r,!1);const d=g();let t=e.prop(r,"open",12,!0),o=e.prop(r,"label",12,"");var u={get open(){return t()},set open(p){t(p),e.flush()},get label(){return o()},set label(p){o(p),e.flush()}};e.init();var v=B(),s=e.first_child(v);let a;var i=e.child(s),f=e.child(i,!0);e.reset(i);var l=e.sibling(i,2);let h;e.reset(s);var n=e.sibling(s,2);let _;var m=e.child(n);return e.slot(m,r,"default",{},null),e.reset(n),e.template_effect(()=>{a=e.set_class(s,1,"label-wrap svelte-e5lyqv",null,a,{open:t()}),e.set_text(f,o()),h=e.set_style(l,"",h,{transform:t()?"rotate(0)":"rotate(90deg)"}),_=e.set_style(n,"",_,{display:t()?"block":"none"})}),e.event("click",s,()=>{t(!t()),t()?d("expand"):d("collapse")}),e.append(c,v),e.pop(u)}var q=e.from_html("<!> <!>",1);function W(c,r){e.push(r,!0);let d=e.rest_props(r,["$$slots","$$events","$$legacy"]);const t=new $(d);let o=e.derived(()=>t.shared.label||"");b(c,{get elem_id(){return t.shared.elem_id},get elem_classes(){return t.shared.elem_classes},get visible(){return t.shared.visible},children:(u,v)=>{var s=q(),a=e.first_child(s);{var i=l=>{x(l,e.spread_props({get autoscroll(){return t.shared.autoscroll},get i18n(){return t.i18n}},()=>t.shared.loading_status))};e.if(a,l=>{t.shared.loading_status&&l(i)})}var f=e.sibling(a,2);k(f,{get label(){return e.get(o)},get open(){return t.props.open},$$events:{expand:()=>{t.dispatch("expand"),t.dispatch("gradio_expand")},collapse:()=>t.dispatch("collapse")},children:(l,h)=>{y(l,{children:(n,_)=>{var m=e.comment(),p=e.first_child(m);e.slot(p,r,"default",{},null),e.append(n,m)},$$slots:{default:!0}})},$$slots:{default:!0}}),e.append(u,s)},$$slots:{default:!0}}),e.pop()}export{W as default};
