import { Meta, StoryObj } from '@storybook/react-webpack5';
import CriticalCommsBanner from '.';

export default {
  component: CriticalCommsBanner,
  title: 'Prompts/CriticalCommsBanner',
} satisfies Meta<typeof CriticalCommsBanner>;

type Story = StoryObj<typeof CriticalCommsBanner>;

export const Basic = {
  args: {
    title: 'Your account is overdrawn',
    subtitle: 'Add money within the next 30 days',
    action: { label: 'Take action', href: 'https://wise.com' },
  },
};

export const Sentiments: Story = {
  render: (args) => (
    <>
      <CriticalCommsBanner {...args} sentiment="negative" title="Your account is overdrawn" />
      <CriticalCommsBanner {...args} sentiment="warning" title="Your account needs attention" />
      <CriticalCommsBanner {...args} sentiment="neutral" title="Your transfer is being processed" />
    </>
  ),
  args: {
    subtitle: 'Add money within the next 30 days',
    action: { label: 'Take action', href: 'https://wise.com' },
    className: 'm-b-1',
  },
};
