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