```javascript
class TabsContainer extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
connectedCallback() {
this.render();
this.attachEvents();
}
render() {
this.shadowRoot.innerHTML = `
`;
}
attachEvents() {
const buttons = this.shadowRoot.querySelectorAll('.tab-button');
const panels = this.querySelectorAll('tab-panel');
buttons.forEach(button => {
button.addEventListener('click', () => {
const tabId = button.dataset.tab;
buttons.forEach(b => b.classList.remove('active'));
button.classList.add('active');
panels.forEach(panel => {
panel.removeAttribute('active');
if (panel.id === tabId) {
panel.setAttribute('active', '');
}
});
});
});
}
}
customElements.define('tabs-container', TabsContainer);
class TabPanel extends HTMLElement {
connectedCallback() {
this.style.display = this.hasAttribute('active') ? 'block' : 'none';
}
static get observedAttributes() {
return
___METADATA_START___
{"repoId":"00Boobs00/omniloop-ai","isNew":false,"userName":"00Boobs00"}
___METADATA_END___