import { ComponentMeta, ComponentStory } from '@storybook/react';
import JarvisDataCard from './jarvis-data-card';
import type { UserInfoProps } from '../../user-info';
import { ASSETS_URL } from '../../../consts/common';

export default {
  title: 'Cards/Jarvis Data Card',
  component: JarvisDataCard
} as ComponentMeta<typeof JarvisDataCard>;

const avatarProps: UserInfoProps = {
  name: 'Dima Kordun',
  userRole: 'Administrator',
  userEmail: 'dima@perimeter81.com',
  avatarProps: {
    initials: 'DK',
    backgroundColor: '#CB5BCB'
  },
  statusBadgeProps: {
    color: 'primary'
  }
};

const Template: ComponentStory<typeof JarvisDataCard> = args => <JarvisDataCard {...args} />;

export const Addons = Template.bind({});
Addons.args = {
  title: 'Addons',
  number: 14,
  icon: `${ASSETS_URL}/icons/icon_addons.svg`
};

export const Avatar = Template.bind({});
Avatar.args = {
  userInfo: {
    name: 'Mock User',
    userRole: 'Developer',
    userEmail: 'mock@fake.com',
    initials: 'DK',
    backgroundColor: '#CB5BCB'
  }
};
