import * as React from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; import { s } from "@shared/styles"; import InputSelect, { Props as SelectProps } from "~/components/InputSelect"; import { EmptySelectValue, Permission } from "~/types"; export default function InputMemberPermissionSelect( props: Partial & { permissions: Permission[] } ) { const { value, onChange, ...rest } = props; const { t } = useTranslation(); const handleChange = React.useCallback( (value) => { onChange?.(value === EmptySelectValue ? null : value); }, [onChange] ); return (