import Button, {
  ButtonShape,
  ButtonSize,
  ButtonVariant,
} from '@/components/button/Button';

type ChatSessionAlertProps = {
  title: string;
  subtitle: string;
  buttonText: string;
  onClick: () => void;
};

export const ChatSessionAlert = ({
  title,
  subtitle,
  buttonText,
  onClick,
}: ChatSessionAlertProps) => {
  return (
    <div className='mx-4 mb-4 rounded-xl border border-accent-error/20 bg-accent-error/10 p-4 shadow-sm'>
      <div className='flex items-center gap-3'>
        <div className='flex h-5 w-5 items-center justify-center rounded-full bg-accent-error'>
          <span className='text-xs font-bold text-white'>!</span>
        </div>
        <div className='flex-1'>
          <div className='font-medium text-accent-error'>{title}</div>
          <div className='text-sm text-foreground-secondary'>{subtitle}</div>
        </div>
        <Button
          variant={ButtonVariant.Primary}
          shape={ButtonShape.Pill}
          size={ButtonSize.Small}
          className='bg-accent-error text-white hover:bg-accent-error/90'
          onClick={onClick}
        >
          {buttonText}
        </Button>
      </div>
    </div>
  );
};
