import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import"./i18n-BldJSFLV.js";import{G as P}from"./utils.svelte-Ceck75cM.js";import"./svelte/svelte_internal_flags_legacy.js";import{createEventDispatcher as q,getContext as A,onMount as D,tick as E}from"./svelte/svelte_svelte.js";import{a as M}from"./Walkthrough-BGVrgc3k.js";import{B as j}from"./Index.svelte_svelte_type_style_lang-Bv_DpXXD.js";import"./svelte/svelte_store.js";import"./index-Ds2meNS5.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"./StreamingBar-b2qVLPYU.js";import"./IconButtonWrapper-Cljb5D-5.js";import"./MarkdownCode-C2b9iIxl.js";import"./prism-python-CpYAgONt.js";var z=e.from_html('<div role="tabpanel"><!></div>');function F(b,r){e.push(r,!1);const m=()=>e.store_get(k,"$selected_tab_index",o),s=()=>e.store_get(T,"$selected_tab",o),[o,x]=e.setup_stores(),n=e.mutable_source();let l=e.prop(r,"elem_id",12,""),u=e.prop(r,"elem_classes",28,()=>[]),i=e.prop(r,"label",12),d=e.prop(r,"id",28,()=>({})),_=e.prop(r,"visible",12),f=e.prop(r,"interactive",12),c=e.prop(r,"order",12),a=e.prop(r,"scale",12),g=e.prop(r,"component_id",12);const w=q(),{register_tab:I,unregister_tab:S,selected_tab:T,selected_tab_index:k}=A(M);let v=e.mutable_source();function C(t,h){return t=JSON.parse(t),I(t,h)}D(()=>()=>S({label:i(),id:d(),elem_id:l()},c())),e.legacy_pre_effect(()=>(e.deep_read_state(i()),e.deep_read_state(d()),e.deep_read_state(l()),e.deep_read_state(_()),e.deep_read_state(f()),e.deep_read_state(a()),e.deep_read_state(g())),()=>{e.set(n,JSON.stringify({label:i(),id:d(),elem_id:l(),visible:_(),interactive:f(),scale:a(),component_id:g()}))}),e.legacy_pre_effect(()=>(e.get(n),e.deep_read_state(c())),()=>{e.set(v,C(e.get(n),c()))}),e.legacy_pre_effect(()=>(m(),e.get(v),e.deep_read_state(i())),()=>{m()===e.get(v)&&E().then(()=>w("select",{value:i(),index:e.get(v)}))}),e.legacy_pre_effect_reset();var G={get elem_id(){return l()},set elem_id(t){l(t),e.flush()},get elem_classes(){return u()},set elem_classes(t){u(t),e.flush()},get label(){return i()},set label(t){i(t),e.flush()},get id(){return d()},set id(t){d(t),e.flush()},get visible(){return _()},set visible(t){_(t),e.flush()},get interactive(){return f()},set interactive(t){f(t),e.flush()},get order(){return c()},set order(t){c(t),e.flush()},get scale(){return a()},set scale(t){a(t),e.flush()},get component_id(){return g()},set component_id(t){g(t),e.flush()}};e.init();var p=z();let y,$;var J=e.child(p);{let t=e.derived_safe_equal(()=>a()>=1?a():null);j(J,{get scale(){return e.get(t)},children:(h,H)=>{var B=e.comment(),O=e.first_child(B);e.slot(O,r,"default",{},null),e.append(h,B)},$$slots:{default:!0}})}e.reset(p),e.template_effect(t=>{e.set_attribute(p,"id",l()),y=e.set_class(p,1,`tabitem ${t??""}`,"svelte-dmtrd3",y,{"grow-children":a()>=1}),$=e.set_style(p,"",$,{display:s()===d()&&_()!==!1?"flex":"none","flex-grow":a()})},[()=>(e.deep_read_state(u()),e.untrack(()=>u().join(" ")))]),e.append(b,p);var N=e.pop(G);return x(),N}function fe(b,r){e.push(r,!0);let m=e.rest_props(r,["$$slots","$$events","$$legacy"]);const s=new P(m);F(b,{get elem_id(){return s.shared.elem_id},get elem_classes(){return s.shared.elem_classes},get label(){return s.shared.label},get visible(){return s.shared.visible},get interactive(){return s.shared.interactive},get id(){return s.props.id},get order(){return s.props.order},get scale(){return s.props.scale},get component_id(){return s.props.component_id},$$events:{select:({detail:o})=>s.dispatch("select",o)},children:(o,x)=>{var n=e.comment(),l=e.first_child(n);e.slot(l,r,"default",{},null),e.append(o,n)},$$slots:{default:!0}}),e.pop()}export{F as BaseTabItem,fe as default};
