import { f as fallback, w as writable } from './async-Djx13DAD.js';
import { s as store_get, q as store_set, d as attr_class, a as attr, g as attr_style, j as stringify, e as ensure_array_like, i as slot, u as unsubscribe_stores, c as bind_props } from './index-B7gr0Dsc.js';
import { s as setContext } from './context-BZS6UlnY.js';
import { e as escape_html } from './escaping-CBnpiEl5.js';

function M(v){v.push('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="2.5" cy="8" r="1.5" fill="currentColor"></circle><circle cx="8" cy="8" r="1.5" fill="currentColor"></circle><circle cx="13.5" cy="8" r="1.5" fill="currentColor"></circle></svg>');}const O={};function G(v,_){v.component(e=>{var o;let g,p,h=fallback(_.visible,true),m=fallback(_.elem_id,""),w=fallback(_.elem_classes,()=>[],true),u=_.selected,r=_.initial_tabs,n=[...r],C=[...r],x=[],y=false;const c=writable(u||n[0]?.id||false),b=writable(n.findIndex(l=>l?.id===u)||0);let q=false;setContext(O,{register_tab:(l,a)=>(n[a]=l,store_get(o??={},"$selected_tab",c)===false&&l.visible!==false&&l.interactive&&(store_set(c,l.id),store_set(b,a)),a),unregister_tab:(l,a)=>{store_get(o??={},"$selected_tab",c)===l.id&&store_set(c,n[0]?.id||false),n[a]=null;},selected_tab:c,selected_tab_index:b});function I(l){const a=n.find(d=>d?.id===l);l!==void 0&&a&&a.interactive&&a.visible!==false&&store_get(o??={},"$selected_tab",c)!==a.id&&(u=l,store_set(c,l),store_set(b,n.findIndex(d=>d?.id===l)),y=false);}async function B(){}function j(l){return l===false?false:x.some(a=>a?.id===l)}if(g=n.length>0,u!==null&&I(u),B(),q=j(store_get(o??={},"$selected_tab",c)),p=n[store_get(o??={},"$selected_tab_index",b)>=0?store_get(o??={},"$selected_tab_index",b):0]?.scale,e.push(`<div${attr_class(`tabs ${stringify(w.join(" "))}`,"svelte-11gaq1",{hide:h===false,hidden:h==="hidden"})}${attr("id",m)}${attr_style("",{"flex-grow":p})}>`),g){e.push("<!--[-->"),e.push('<div class="tab-wrapper svelte-11gaq1"><div class="tab-container visually-hidden svelte-11gaq1" aria-hidden="true"><!--[-->');const l=ensure_array_like(n);for(let i=0,f=l.length;i<f;i++){let s$1=l[i];s$1&&s$1?.visible!==false&&s$1?.visible!=="hidden"?(e.push("<!--[-->"),e.push(`<button class="svelte-11gaq1">${escape_html(s$1?.label)}</button>`)):e.push("<!--[!-->"),e.push("<!--]-->");}e.push('<!--]--></div> <div class="tab-container svelte-11gaq1" role="tablist"><!--[-->');const a=ensure_array_like(C);for(let i=0,f=a.length;i<f;i++){let s$1=a[i];s$1&&s$1?.visible!==false?(e.push("<!--[-->"),e.push(`<button role="tab"${attr("aria-selected",s$1.id===store_get(o??={},"$selected_tab",c))}${attr("aria-controls",s$1.elem_id)}${attr("disabled",!s$1.interactive,true)}${attr("aria-disabled",!s$1.interactive)}${attr("id",s$1.elem_id?s$1.elem_id+"-button":null)}${attr("data-tab-id",s$1.id)}${attr_class("svelte-11gaq1",void 0,{selected:s$1.id===store_get(o??={},"$selected_tab",c)})}>${escape_html(s$1?.label!==void 0?s$1?.label:"Tab "+(i+1))}</button>`)):e.push("<!--[!-->"),e.push("<!--]-->");}e.push(`<!--]--></div> <span${attr_class("overflow-menu svelte-11gaq1",void 0,{hide:true})}><button${attr_class("svelte-11gaq1",void 0,{"overflow-item-selected":q})}>`),M(e),e.push(`<!----></button> <div${attr_class("overflow-dropdown svelte-11gaq1",void 0,{hide:!y})}><!--[-->`);const d=ensure_array_like(x);for(let i=0,f=d.length;i<f;i++){let s$1=d[i];s$1?.visible!==false?(e.push("<!--[-->"),e.push(`<button${attr_class("svelte-11gaq1",void 0,{selected:s$1?.id===store_get(o??={},"$selected_tab",c)})}>${escape_html(s$1?.label)}</button>`)):e.push("<!--[!-->"),e.push("<!--]-->");}e.push("<!--]--></div></span></div>");}else e.push("<!--[!-->");e.push("<!--]--> <!--[-->"),slot(e,_,"default",{},null),e.push("<!--]--></div>"),o&&unsubscribe_stores(o),bind_props(_,{visible:h,elem_id:m,elem_classes:w,selected:u,initial_tabs:r});});}

export { G, O };
//# sourceMappingURL=Walkthrough.svelte_svelte_type_style_lang-B-su9fRx.js.map
