import e from"/static/logging/index.js";e.getLogger("ruteni.plugin.blaze").setLevel("DEBUG");const s=["variables.host","variables.root","generics.global","components.addresses","components.alerts","components.avatars","components.back-to-top","components.badges","components.breadcrumbs","components.buttons","components.calendars","components.cards","components.divider","components.github-buttons","components.file-upload","components.headings","components.hints","components.inputs","components.input-groups","components.links","components.lists","components.overlays","components.pagination","components.progress","components.ranges","components.tabs","components.tables","components.tags","components.timelines","components.toggles","components.tooltips","components.trees","objects.containers","objects.grid","objects.grid.responsive","objects.images","objects.panels","objects.media","objects.forms","objects.modals","objects.drawers","utilities.alignment","utilities.boxing","utilities.elevation","utilities.radius","utilities.sizes","utilities.typography","utilities.visibility"];function o(e){e.sort(((e,o)=>e===o?0:s.indexOf(e)<s.indexOf(o)?-1:1)),e.unshift("variables.host","generics.global")}function t(e){const s=e.querySelector(".o-modal").classList,o=s.contains("o-modal--visible"),t=o?"remove":"add";s[t]("o-modal--visible");const n=e.querySelector(".c-overlay");return n&&n.classList[t]("c-overlay--visible"),!o}function n(e){e.querySelectorAll(".c-tabs").forEach((e=>{const s=e.querySelectorAll(".c-tab-heading"),o=o=>{let t=0;s.forEach((s=>{let n;if(s===o.target){n="add";let s=0;e.querySelectorAll(".c-tabs__tab").forEach((e=>{t===s?e.removeAttribute("hidden"):e.setAttribute("hidden",""),s++}))}else n="remove";s.classList[n]("c-tab-heading--active"),t++}))};s.forEach((e=>e.onclick=o))}))}const i=e=>e.classList.remove("u-display-none"),a=e=>e.classList.add("u-display-none"),c=e=>!e.classList.contains("u-display-none"),l=(...e)=>e.forEach((e=>e.classList.toggle("u-display-none"))),r=(e,s)=>s.classList[e?"remove":"add"]("u-display-none"),d=(e,...s)=>{e||s.reverse(),s[0].classList.remove("u-display-none"),s[1].hidden.classList.add("u-display-none")},p=(e,s)=>s.forEach((s=>s.classList[e(s)?"remove":"add"]("u-display-none")));function m(e,s){e.addEventListener("slotchange",(o=>{e.assignedNodes().length?(i(e),a(s)):(i(s),a(e))}))}export{p as filter,a as hide,c as isVisible,m as setupSlotVisibility,n as setupTabs,i as show,r as showIf,d as showIfElse,o as sort,t as toggleModal,l as toggleVisibility};
