import"./svelte/svelte_internal_flags_async.js";import*as t from"./svelte/svelte_internal_client.js";import"./i18n-BldJSFLV.js";import{G as u}from"./utils.svelte-Ceck75cM.js";import{W as g,T as f}from"./Walkthrough-BGVrgc3k.js";import{a as J}from"./Walkthrough-BGVrgc3k.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.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";function E(d,a){t.push(a,!0);let n=t.rest_props(a,["$$slots","$$events","$$legacy"]);const e=new u(n);let o=t.state(t.proxy(e.props.selected));t.user_effect(()=>{if(t.get(o)!==e.props.selected){const r=e.props.initial_tabs.findIndex(s=>s.id===e.props.selected);e.dispatch("gradio_tab_select",{value:e.props.initial_tabs[r].label,index:r,id:e.props.initial_tabs[r].id,component_id:e.props.initial_tabs[r].component_id}),t.set(o,e.props.selected,!0)}});var p=t.comment(),c=t.first_child(p);{var m=r=>{g(r,{get visible(){return e.shared.visible},get elem_id(){return e.shared.elem_id},get elem_classes(){return e.shared.elem_classes},get initial_tabs(){return e.props.initial_tabs},get selected(){return e.props.selected},set selected(s){e.props.selected=s},$$events:{change:()=>e.dispatch("change"),select:s=>{e.dispatch("select",s.detail),e.dispatch("gradio_tab_select",s.detail)}},children:(s,h)=>{var i=t.comment(),l=t.first_child(i);t.slot(l,a,"default",{},null),t.append(s,i)},$$slots:{default:!0}})},_=r=>{f(r,{get visible(){return e.shared.visible},get elem_id(){return e.shared.elem_id},get elem_classes(){return e.shared.elem_classes},get initial_tabs(){return e.props.initial_tabs},get selected(){return e.props.selected},set selected(s){e.props.selected=s},$$events:{change:()=>e.dispatch("change"),select:s=>{e.dispatch("select",s.detail),e.dispatch("gradio_tab_select",s.detail)}},children:(s,h)=>{var i=t.comment(),l=t.first_child(i);t.slot(l,a,"default",{},null),t.append(s,i)},$$slots:{default:!0}})};t.if(c,r=>{e.props.name==="walkthrough"?r(m):r(_,!1)})}t.append(d,p),t.pop()}export{f as BaseTabs,J as TABS,E as default};
