'use client'
import type { FC } from 'react'
import { Button } from '@langgenius/dify-ui/button'
import { cn } from '@langgenius/dify-ui/cn'
import {
  RiAddLine,
} from '@remixicon/react'
import * as React from 'react'

type Props = Readonly<{
  className?: string
  text: string
  onClick: () => void
}>

const AddButton: FC<Props> = ({
  className,
  text,
  onClick,
}) => {
  return (
    <Button
      className={cn('w-full', className)}
      variant="tertiary"
      size="medium"
      onClick={onClick}
    >
      <RiAddLine className="mr-1 size-3.5" />
      <div>{text}</div>
    </Button>
  )
}
export default React.memo(AddButton)
