'use client'; import clsx from 'clsx'; import { MiniButton } from '@/components/Control'; import { Dropdown, useDropdown } from '@/components/Dropdown'; import { IconFolderTree } from '@/components/Icons'; import { CProps } from '@/components/props'; import { prefixes } from '@/utils/constants'; import SelectLocation from './SelectLocation'; interface SelectLocationContextProps extends CProps.Styling { value: string; onChange: (newValue: string) => void; title?: string; stretchTop?: boolean; } export function SelectLocationContext({ value, title = 'Проводник...', onChange, className, style }: SelectLocationContextProps) { const menu = useDropdown(); function handleClick(event: CProps.EventMouse, newValue: string) { event.preventDefault(); event.stopPropagation(); menu.hide(); onChange(newValue); } return (