"use client"; import type { FC } from "react"; import { Controller, useFormContext } from "react-hook-form"; // plane imports import { NETWORK_CHOICES, ETabIndices } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import type { IProject } from "@plane/types"; import { CustomSelect } from "@plane/ui"; import { getTabIndex } from "@plane/utils"; // components import { MemberDropdown } from "@/components/dropdowns/member/dropdown"; import { ProjectNetworkIcon } from "@/components/project/project-network-icon"; type Props = { isMobile?: boolean; }; const ProjectAttributes: FC = (props) => { const { isMobile = false } = props; const { t } = useTranslation(); const { control } = useFormContext(); const { getIndex } = getTabIndex(ETabIndices.PROJECT_CREATE, isMobile); return (
{ const currentNetwork = NETWORK_CHOICES.find((n) => n.key === value); return (
{currentNetwork ? ( <> {t(currentNetwork.i18n_label)} ) : ( {t("select_network")} )}
} placement="bottom-start" className="h-full" buttonClassName="h-full" noChevron tabIndex={getIndex("network")} > {NETWORK_CHOICES.map((network) => (

{t(network.i18n_label)}

{t(network.description)}

))}
); }} /> { if (value === undefined || value === null || typeof value === "string") return (
onChange(lead === value ? null : lead)} placeholder={t("lead")} multiple={false} buttonVariant="border-with-text" tabIndex={5} />
); else return <>; }} /> ); }; export default ProjectAttributes;