import { ComponentPropsWithoutRef, forwardRef, useImperativeHandle, useRef, } from "react" import { TrianglesMini } from "@medusajs/icons" import { clx } from "@medusajs/ui" import { useTranslation } from "react-i18next" import { countries } from "../../../lib/data/countries" export const CountrySelect = forwardRef< HTMLSelectElement, ComponentPropsWithoutRef<"select"> & { placeholder?: string value?: string defaultValue?: string } >( ( { className, disabled, placeholder, value, defaultValue, ...props }, ref ) => { const { t } = useTranslation() const innerRef = useRef(null) useImperativeHandle(ref, () => innerRef.current as HTMLSelectElement) const isPlaceholder = innerRef.current?.value === "" return (
) } ) CountrySelect.displayName = "CountrySelect"