import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; import React from "react"; import { useIntl } from "react-intl"; import slugify from "slugify"; import CardTitle from "@saleor/components/CardTitle"; import ControlledSwitch from "@saleor/components/ControlledSwitch"; import FormSpacer from "@saleor/components/FormSpacer"; import SingleSelectField from "@saleor/components/SingleSelectField"; import { commonMessages } from "@saleor/intl"; import { FormErrors } from "@saleor/types"; import { AttributeInputTypeEnum } from "@saleor/types/globalTypes"; import { AttributePageFormData } from "../AttributePage"; export interface AttributeDetailsProps { canChangeType: boolean; data: AttributePageFormData; disabled: boolean; errors: FormErrors<"name" | "slug" | "inputType">; onChange: (event: React.ChangeEvent) => void; } const AttributeDetails: React.FC = ({ canChangeType, data, disabled, errors, onChange }) => { const intl = useIntl(); const inputTypeChoices = [ { label: intl.formatMessage({ defaultMessage: "Dropdown", description: "product attribute type" }), value: AttributeInputTypeEnum.DROPDOWN }, { label: intl.formatMessage({ defaultMessage: "Multiple Select", description: "product attribute type" }), value: AttributeInputTypeEnum.MULTISELECT } ]; return ( ); }; AttributeDetails.displayName = "AttributeDetails"; export default AttributeDetails;