import { components, GroupBase, Props, SingleValue } from "react-select"; import type { EventLocationType } from "@calcom/app-store/locations"; import { classNames } from "@calcom/lib"; import Select from "@components/ui/form/Select"; export type LocationOption = { label: string; value: EventLocationType["type"]; icon?: string; disabled?: boolean; }; export type SingleValueLocationOption = SingleValue; export type GroupOptionType = GroupBase; const OptionWithIcon = ({ icon, isSelected, label, }: { icon?: string; isSelected?: boolean; label: string; }) => { return (
{icon && cover} {label}
); }; export default function LocationSelect(props: Props) { return ( name="location" components={{ Option: (props) => ( ), SingleValue: (props) => ( ), }} formatOptionLabel={(e) => (
{e.icon && app-icon} {e.label}
)} formatGroupLabel={(e) =>

{e.label}

} {...props} /> ); }