import { CSSResultArray , html , PropertyValues , SpectrumElement , TemplateResult , } from '@spectrum-web-components/base' ; import { property } from '@spectrum-web-components/base/src/decorators.js' ; import sidenavItemStyles from './sidenav-item.css.js' ; import sidenavHeadingStyles from './sidenav-heading.css.js' ; element slot export class SideNavHeading extends SpectrumElement { @ property ( { reflect : true } ) public label = '' ; public static get styles ( ) : CSSResultArray { return [ sidenavItemStyles , sidenavHeadingStyles ] ; } protected update ( changes ) { if ( ! this . hasAttribute ( 'slot' ) ) { this . slot = 'descendant' ; } super . update ( changes ) ; } protected render ( ) { return html `
            <h2 id="heading">${ this . label }</h2>
            <div id="list" aria-labelledby="heading">
                <slot name="descendant"></slot>
            </div>
        ` ; } }