'use client'; import clsx from 'clsx'; import { LocationIcon } from '@/components/DomainIcons'; import { CProps } from '@/components/props'; import Dropdown from '@/components/ui/Dropdown'; import DropdownButton from '@/components/ui/DropdownButton'; import SelectorButton from '@/components/ui/SelectorButton'; import useDropdown from '@/hooks/useDropdown'; import { LocationHead } from '@/models/library'; import { prefixes } from '@/utils/constants'; import { describeLocationHead, labelLocationHead } from '@/utils/labels'; interface SelectLocationHeadProps extends CProps.Styling { value: LocationHead; onChange: (newValue: LocationHead) => void; excluded?: LocationHead[]; } function SelectLocationHead({ value, excluded = [], onChange, className, ...restProps }: SelectLocationHeadProps) { const menu = useDropdown(); function handleChange(newValue: LocationHead) { menu.hide(); onChange(newValue); } return (