import { expect, fixture, html } from '@open-wc/testing';
import './nile-inline-sidebar';
import '../nile-inline-sidebar-item/nile-inline-sidebar-item';
import '../nile-inline-sidebar-group/nile-inline-sidebar-group';
describe('NileInlineSidebar', () => {
    it('1. renders', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el).to.exist; });
    it('2. shadow root', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot).to.not.be.null; });
    it('3. tag name', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.tagName.toLowerCase()).to.equal('nile-inline-sidebar'); });
    it('4. collapsed defaults false', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.collapsed).to.be.false; });
    it('5. fixed defaults false', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.fixed).to.be.false; });
    it('6. showTooltip defaults false', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.showTooltip).to.be.false; });
    it('7. placement defaults left', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.placement).to.equal('left'); });
    it('8. set collapsed', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); expect(el.collapsed).to.be.true; });
    it('9. set fixed', async () => { const el = await fixture(html `<nile-inline-sidebar fixed></nile-inline-sidebar>`); expect(el.fixed).to.be.true; });
    it('10. set showTooltip', async () => { const el = await fixture(html `<nile-inline-sidebar showTooltip></nile-inline-sidebar>`); expect(el.showTooltip).to.be.true; });
    it('11. set placement right', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right"></nile-inline-sidebar>`); expect(el.placement).to.equal('right'); });
    it('12. set placement left', async () => { const el = await fixture(html `<nile-inline-sidebar placement="left"></nile-inline-sidebar>`); expect(el.placement).to.equal('left'); });
    it('13. collapsed reflects', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); expect(el.hasAttribute('collapsed')).to.be.true; });
    it('14. fixed reflects', async () => { const el = await fixture(html `<nile-inline-sidebar fixed></nile-inline-sidebar>`); expect(el.hasAttribute('fixed')).to.be.true; });
    it('15. placement reflects', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right"></nile-inline-sidebar>`); expect(el.getAttribute('placement')).to.equal('right'); });
    it('16. sidebar class', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('.sidebar')).to.exist; });
    it('17. base part', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('[part="base"]')).to.exist; });
    it('18. header part', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('[part="header"]')).to.exist; });
    it('19. nav-items part', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('[part="nav-items"]')).to.exist; });
    it('20. sidebar-header class', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('.sidebar-header')).to.exist; });
    it('21. sidebar-nav class', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('.sidebar-nav')).to.exist; });
    it('22. nav element', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('nav')).to.exist; });
    it('23. default slot', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('slot')).to.exist; });
    it('24. toggle-btn when expanded', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('.toggle-btn')).to.exist; });
    it('25. no toggle-btn when fixed', async () => { const el = await fixture(html `<nile-inline-sidebar fixed></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('.toggle-btn')).to.be.null; });
    it('26. collapsed nav hidden', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); const nav = el.shadowRoot.querySelector('.sidebar-nav'); expect(nav.style.display).to.equal('none'); });
    it('27. expanded nav visible', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); const nav = el.shadowRoot.querySelector('.sidebar-nav'); expect(nav.style.display).to.not.equal('none'); });
    it('28. collapsed shows side-bar-action', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('nile-side-bar-action')).to.exist; });
    it('29. expanded hides side-bar-action', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('nile-side-bar-action')).to.be.null; });
    it('30. collapsed shows action-menu', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('nile-side-bar-action-menu')).to.exist; });
    it('31. left expanded icon menu_open', async () => { const el = await fixture(html `<nile-inline-sidebar placement="left"></nile-inline-sidebar>`); const icon = el.shadowRoot.querySelector('nile-icon'); expect(icon?.getAttribute('name')).to.equal('menu_open'); });
    it('32. right expanded icon menu_close', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right"></nile-inline-sidebar>`); const icon = el.shadowRoot.querySelector('nile-icon'); expect(icon?.getAttribute('name')).to.equal('menu_close'); });
    it('33. left collapsed icon menu_close', async () => { const el = await fixture(html `<nile-inline-sidebar placement="left" collapsed></nile-inline-sidebar>`); const icon = el.shadowRoot.querySelector('nile-icon'); expect(icon?.getAttribute('name')).to.equal('menu_close'); });
    it('34. right collapsed icon menu_open', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right" collapsed></nile-inline-sidebar>`); const icon = el.shadowRoot.querySelector('nile-icon'); expect(icon?.getAttribute('name')).to.equal('menu_open'); });
    it('35. left action placement bottom-start', async () => { const el = await fixture(html `<nile-inline-sidebar placement="left" collapsed></nile-inline-sidebar>`); const action = el.shadowRoot.querySelector('nile-side-bar-action'); expect(action?.getAttribute('placement')).to.equal('bottom-start'); });
    it('36. right action placement bottom-end', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right" collapsed></nile-inline-sidebar>`); const action = el.shadowRoot.querySelector('nile-side-bar-action'); expect(action?.getAttribute('placement')).to.equal('bottom-end'); });
    it('37. fixed forces collapsed false', async () => { const el = await fixture(html `<nile-inline-sidebar fixed></nile-inline-sidebar>`); expect(el.collapsed).to.be.false; });
    it('38. dynamic collapsed on', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.collapsed = true; await el.updateComplete; expect(el.hasAttribute('collapsed')).to.be.true; });
    it('39. dynamic collapsed off', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); el.collapsed = false; await el.updateComplete; expect(el.hasAttribute('collapsed')).to.be.false; });
    it('40. dynamic placement to right', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.placement = 'right'; await el.updateComplete; expect(el.getAttribute('placement')).to.equal('right'); });
    it('41. dynamic placement to left', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right"></nile-inline-sidebar>`); el.placement = 'left'; await el.updateComplete; expect(el.getAttribute('placement')).to.equal('left'); });
    it('42. dynamic fixed', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.fixed = true; await el.updateComplete; expect(el.hasAttribute('fixed')).to.be.true; });
    it('43. slotted item', async () => { const el = await fixture(html `<nile-inline-sidebar><nile-inline-sidebar-item>A</nile-inline-sidebar-item></nile-inline-sidebar>`); expect(el.querySelector('nile-inline-sidebar-item')).to.exist; });
    it('44. slotted group', async () => { const el = await fixture(html `<nile-inline-sidebar><nile-inline-sidebar-group label="G"><nile-inline-sidebar-item>A</nile-inline-sidebar-item></nile-inline-sidebar-group></nile-inline-sidebar>`); expect(el.querySelector('nile-inline-sidebar-group')).to.exist; });
    it('45. multiple items', async () => { const el = await fixture(html `<nile-inline-sidebar><nile-inline-sidebar-item>A</nile-inline-sidebar-item><nile-inline-sidebar-item>B</nile-inline-sidebar-item><nile-inline-sidebar-item>C</nile-inline-sidebar-item></nile-inline-sidebar>`); expect(el.querySelectorAll('nile-inline-sidebar-item').length).to.equal(3); });
    it('46. emits nile-toggle on collapse', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); let detail; el.addEventListener('nile-toggle', ((e) => { detail = e.detail; })); const btn = el.shadowRoot.querySelector('.toggle-btn'); btn.click(); expect(detail).to.exist; expect(detail.collapsed).to.be.true; });
    it('47. emits nile-toggle on expand', async () => { const el = await fixture(html `<nile-inline-sidebar collapsed></nile-inline-sidebar>`); let detail; el.addEventListener('nile-toggle', ((e) => { detail = e.detail; })); const btn = el.shadowRoot.querySelector('.toggle-btn'); btn.click(); expect(detail).to.exist; expect(detail.collapsed).to.be.false; });
    it('48. has styles', async () => { expect((await import('./nile-inline-sidebar')).NileInlineSidebar.styles).to.exist; });
    it('49. is defined', async () => { expect(customElements.get('nile-inline-sidebar')).to.exist; });
    it('50. shadow mode', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.mode).to.equal('open'); });
    it('51. isConnected', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.isConnected).to.be.true; });
    it('52. removal', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.remove(); expect(el.isConnected).to.be.false; });
    it('53. outerHTML', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.outerHTML).to.contain('nile-inline-sidebar'); });
    it('54. matches', async () => { const el = await fixture(html `<nile-inline-sidebar class="x"></nile-inline-sidebar>`); expect(el.matches('.x')).to.be.true; });
    it('55. closest', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.closest('nile-inline-sidebar')).to.equal(el); });
    it('56. cloneNode', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.cloneNode(true).tagName.toLowerCase()).to.equal('nile-inline-sidebar'); });
    it('57. dispatchEvent', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); let f = false; el.addEventListener('c', () => (f = true)); el.dispatchEvent(new Event('c')); expect(f).to.be.true; });
    it('58. updateComplete', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); const r = await el.updateComplete; expect(r).to.not.be.undefined; });
    it('59. render method', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.render).to.be.a('function'); });
    it('60. shadowRoot host', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.host).to.equal(el); });
    it('61. class attr', async () => { const el = await fixture(html `<nile-inline-sidebar class="s"></nile-inline-sidebar>`); expect(el.classList.contains('s')).to.be.true; });
    it('62. id attr', async () => { const el = await fixture(html `<nile-inline-sidebar id="s1"></nile-inline-sidebar>`); expect(el.id).to.equal('s1'); });
    it('63. hidden', async () => { const el = await fixture(html `<nile-inline-sidebar hidden></nile-inline-sidebar>`); expect(el.hidden).to.be.true; });
    it('64. nodeType', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.nodeType).to.equal(1); });
    it('65. localName', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.localName).to.equal('nile-inline-sidebar'); });
    it('66. namespaceURI', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.namespaceURI).to.equal('http://www.w3.org/1999/xhtml'); });
    it('67. ownerDocument', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.ownerDocument).to.equal(document); });
    it('68. multiple instances', async () => { const c = await fixture(html `<div><nile-inline-sidebar></nile-inline-sidebar><nile-inline-sidebar></nile-inline-sidebar></div>`); expect(c.querySelectorAll('nile-inline-sidebar').length).to.equal(2); });
    it('69. parent-child', async () => { const c = await fixture(html `<div><nile-inline-sidebar></nile-inline-sidebar></div>`); expect(c.querySelector('nile-inline-sidebar').parentElement).to.equal(c); });
    it('70. createElement', async () => { const el = document.createElement('nile-inline-sidebar'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
    it('71. dataset', async () => { const el = await fixture(html `<nile-inline-sidebar data-idx="0"></nile-inline-sidebar>`); expect(el.dataset.idx).to.equal('0'); });
    it('72. classList add', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.classList.add('z'); expect(el.classList.contains('z')).to.be.true; });
    it('73. getBoundingClientRect', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.getBoundingClientRect()).to.exist; });
    it('74. no form', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('form')).to.be.null; });
    it('75. no input', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('input')).to.be.null; });
    it('76. no anchor', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('a')).to.be.null; });
    it('77. no img', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('img')).to.be.null; });
    it('78. no svg', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('svg')).to.be.null; });
    it('79. style attr', async () => { const el = await fixture(html `<nile-inline-sidebar style="color:red"></nile-inline-sidebar>`); expect(el.style.color).to.equal('red'); });
    it('80. data attr', async () => { const el = await fixture(html `<nile-inline-sidebar data-x="1"></nile-inline-sidebar>`); expect(el.getAttribute('data-x')).to.equal('1'); });
    it('81. aria-label', async () => { const el = await fixture(html `<nile-inline-sidebar aria-label="Sidebar"></nile-inline-sidebar>`); expect(el.getAttribute('aria-label')).to.equal('Sidebar'); });
    it('82. role', async () => { const el = await fixture(html `<nile-inline-sidebar role="navigation"></nile-inline-sidebar>`); expect(el.getAttribute('role')).to.equal('navigation'); });
    it('83. dir', async () => { const el = await fixture(html `<nile-inline-sidebar dir="rtl"></nile-inline-sidebar>`); expect(el.dir).to.equal('rtl'); });
    it('84. title attr', async () => { const el = await fixture(html `<nile-inline-sidebar title="S"></nile-inline-sidebar>`); expect(el.title).to.equal('S'); });
    it('85. lang attr', async () => { const el = await fixture(html `<nile-inline-sidebar lang="en"></nile-inline-sidebar>`); expect(el.lang).to.equal('en'); });
    it('86. tabindex', async () => { const el = await fixture(html `<nile-inline-sidebar tabindex="0"></nile-inline-sidebar>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
    it('87. requestUpdate', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.requestUpdate(); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; });
    it('88. shadow childNodes', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.childNodes.length).to.be.greaterThan(0); });
    it('89. scrollIntoView', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.scrollIntoView).to.be.a('function'); });
    it('90. focus method', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.focus).to.be.a('function'); });
    it('91. blur method', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.blur).to.be.a('function'); });
    it('92. class toggle', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.classList.toggle('a'); expect(el.classList.contains('a')).to.be.true; });
    it('93. toggle hidden', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.hidden = true; expect(el.hidden).to.be.true; });
    it('94. dispatchCustomEvent', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); let d; el.addEventListener('t', ((e) => { d = e.detail; })); el.dispatchEvent(new CustomEvent('t', { detail: 'x' })); expect(d).to.equal('x'); });
    it('95. nested in div', async () => { const c = await fixture(html `<div><nile-inline-sidebar></nile-inline-sidebar></div>`); expect(c.querySelector('nile-inline-sidebar')).to.exist; });
    it('96. no table', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('table')).to.be.null; });
    it('97. no canvas', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); expect(el.shadowRoot.querySelector('canvas')).to.be.null; });
    it('98. setAttribute data', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); el.setAttribute('data-test', '1'); expect(el.dataset.test).to.equal('1'); });
    it('99. multiple re-renders', async () => { const el = await fixture(html `<nile-inline-sidebar></nile-inline-sidebar>`); for (let i = 0; i < 3; i++) {
        el.requestUpdate();
        await el.updateComplete;
    } expect(el.shadowRoot).to.not.be.null; });
    it('100. full integration', async () => { const el = await fixture(html `<nile-inline-sidebar placement="right" class="s" id="s1" aria-label="Nav"><nile-inline-sidebar-group label="Main"><nile-inline-sidebar-item active>Dashboard</nile-inline-sidebar-item><nile-inline-sidebar-item>Analytics</nile-inline-sidebar-item><nile-inline-sidebar-item disabled>Admin</nile-inline-sidebar-item></nile-inline-sidebar-group></nile-inline-sidebar>`); expect(el.placement).to.equal('right'); expect(el.id).to.equal('s1'); expect(el.getAttribute('aria-label')).to.equal('Nav'); expect(el.querySelectorAll('nile-inline-sidebar-item').length).to.equal(3); expect(el.shadowRoot.querySelector('.sidebar')).to.exist; expect(el.shadowRoot.querySelector('nav')).to.exist; });
});
//# sourceMappingURL=nile-inline-sidebar.test.js.map