import { ComponentProps } from "react";

import { Select } from "@/components/ui/select";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";

export function SelectField({
  label,
  className = "",
  labelClassName = "",
  selectClassName = "",
  ...props
}: ComponentProps<typeof Select> & {
  label?: string;
  className?: string;
  labelClassName?: string;
  selectClassName?: string;
}) {
  return (
    <div className={cn(
      `flex flex-row space-x-2 items-center`,
      className
      )}>
      {label && <Label className={cn("text-xs text-zinc-400 w-1/3", labelClassName)}>{label}</Label>}
      <Select {...props} />
    </div>
  )
}