 </ion-accordion-group>

          <p class="listener-out"></p>
        </div>
      </ion-content>
    </ion-app>

    <script>
      const accordionGroup = document.querySelector('ion-accordion-group');
      const listenerOut = document.querySelector('.listener-out');
      const values = ['first', 'second', 'third'];

      accordionGroup.addEventListener('ionChange', (ev) => {
        const collapsedItems = values.filter((value) => value !== ev.detail.value);
        const selectedValue = ev.detail.val