--- import Icon from './Icon.astro' import Avatar from './Avatar.astro' import Flag from './Flag.astro' import people from '@data/people.json' import countries from '@data/countries.json' interface Props { right?: boolean show?: boolean arrow?: boolean dark?: boolean class?: string check?: boolean radio?: boolean people?: boolean flag?: boolean header?: boolean icons?: boolean badge?: boolean active?: boolean disabled?: boolean separated?: boolean } const { right, show, arrow, dark, class: className, check, radio, people: showPeople, flag: showFlags, header, icons, badge, active, disabled, separated } = Astro.props const classes = ['dropdown-menu', right && 'dropdown-menu-end', show && 'dropdown-menu-demo', arrow && 'dropdown-menu-arrow', className] const peopleItems = (people as { id: string; full_name: string }[]).slice(0, 5) const countryItems = (countries as { name: string; flag: string }[]).slice(0, 5) ---
{ check || radio ? ( [1, 2, 3].map((i) => ( )) ) : showPeople ? ( peopleItems.map((person) => ( )) ) : showFlags ? ( countryItems.map((country) => ( )) ) : ( <> {header && Dropdown header} {active && ( )} {disabled && ( )} {separated && ( <>