import type { JSX } from 'solid-js'; import { createComponent, createEffect, mergeProps } from 'solid-js'; import { omitProps } from 'solid-use/props'; import type { SelectOptionStateRenderProps } from '../../states/create-select-option-state'; import { SelectOptionStateChild, useSelectOptionState, } from '../../states/create-select-option-state'; import type { HeadlessPropsWithRef, ValidConstructor } from '../../utils/dynamic-prop'; import { createForwardRef } from '../../utils/dynamic-prop'; import { createOwnerAttribute } from '../../utils/focus-navigator'; import { createARIADisabledState, createARIAExpandedState, createActiveState, createDisabledState, createExpandedState, createSelectedState, } from '../../utils/state-props'; import type { OmitAndMerge } from '../../utils/types'; import useEventListener from '../../utils/use-event-listener'; import type { ButtonProps } from '../button'; import { Button } from '../button'; import { useAccordionContext } from './AccordionContext'; import { useAccordionItemContext } from './AccordionItemContext'; import { ACCORDION_BUTTON_TAG } from './tags'; export type AccordionButtonProps = HeadlessPropsWithRef< T, OmitAndMerge> >; /** * The control that expands and collapses its `AccordionItem`. Carries `aria- * expanded` and `aria-controls`, and takes part in the accordion's arrow-key * navigation. * * Renders a `