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

{e.label}

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