---
import type { LismProps } from '../types';
import { Lism } from '../Lism';
import { Icon } from '../Icon';
import { getAccIconProps } from '../../../dist/components/Accordion/getProps';

// Propsの定義
interface Props extends LismProps {
	icon?: string;
	size?: string;
	iconProps?: Object;
}

const { viewBox, icon = 'caret-down', ...props } = Astro.props || {};
---

<Lism {...getAccIconProps(props)}>
	{Astro.slots.has('default') ? <slot /> : <Icon viewBox={viewBox} icon={icon} />}
</Lism>
