import { Button, ButtonVariantType } from 'index'
import * as AlertDialogPrimitive from './index'
interface AlertDialogDemoProps {
  title: string
  description: string
  cancel: string
  action: string
  label: string
  buttonVariant: ButtonVariantType
}
export default ({
  title,
  description,
  cancel,
  action,
  label,
  buttonVariant = 'default',
  ...props
}: AlertDialogDemoProps) => (
  <AlertDialogPrimitive.Root {...props}>
    <AlertDialogPrimitive.Trigger asChild>
      <Button variant={buttonVariant}>{label}</Button>
    </AlertDialogPrimitive.Trigger>
    <AlertDialogPrimitive.Content>
      <AlertDialogPrimitive.Header>
        <AlertDialogPrimitive.Title>{title}</AlertDialogPrimitive.Title>
        <AlertDialogPrimitive.Description>
          {description}
        </AlertDialogPrimitive.Description>
      </AlertDialogPrimitive.Header>
      <AlertDialogPrimitive.Footer>
        <AlertDialogPrimitive.Cancel>{cancel}</AlertDialogPrimitive.Cancel>
        <AlertDialogPrimitive.Action>{action}</AlertDialogPrimitive.Action>
      </AlertDialogPrimitive.Footer>
    </AlertDialogPrimitive.Content>
  </AlertDialogPrimitive.Root>
)
