import {Meta, StoryObj} from '@storybook/react';

import {StateCard} from './index';

const meta: Meta<typeof StateCard> = {
  title: 'HuGo/StateCard',
  component: StateCard,
  argTypes: {
    variant: {
      control: 'radio',
      options: ['empty', 'success', 'wifi-off', 'error', 'system-failure'],
    },
    title: {control: 'text'},
    description: {control: 'text'},
  },
};

type Story = StoryObj<typeof StateCard>;

export const StateCardComponent: Story = {
  args: {
    variant: 'empty',
    title: 'State Card title',
    description: 'State Card Description',
  },
  render: args => (
    <StateCard {...args}>
      <StateCard.Footer>
        <StateCard.Button
          variant="tertiary"
          text="Buttom small"
          onPress={() => {}}
        />
        <StateCard.Button
          variant="secondary"
          text="Buttom small"
          onPress={() => {}}
        />
      </StateCard.Footer>
    </StateCard>
  ),
};

export default meta;
