import useAttributeTypesList from "@/app/module-editor/[moduleId]/hooks/useAttributeTypesList";
import ObjectSelect, {
    ObjectSelectProps,
} from "@/components/selects/ObjectSelect/ObjectSelect";
import { AttributeTypeSchema } from "@/lib/client";

type Props = Omit<ObjectSelectProps<AttributeTypeSchema>, "data">;

const AttributeTypeSelect = (props: Props) => {
    const { attributeTypes } = useAttributeTypesList();

    return (
        <ObjectSelect
            label={"Тип атрибута"}
            data={attributeTypes}
            {...props}
        />
    );
};

export default AttributeTypeSelect;
