import { html, TemplateResult } from 'lit';
import '../src/nile-button';

export default {
  title: 'Nile Icons',
  component: 'nile-icon',
  argTypes: {
    name: { control: 'text' },
    textColor: { control: 'color' },
  },
};

interface Story<T> {
  (args: T): TemplateResult;
  args?: Partial<T>;
  argTypes?: Record<string, unknown>;
}

interface ArgTypes {
  title?: string;
  name?: string;
  textColor?: string;
  slot?: TemplateResult;
}

const Template: Story<ArgTypes> = ({
  title = 'Agents',
  textColor,
  name,
  slot,
}: ArgTypes) => html`
  <h1>heading 2 ${name}</h1>
`;

export const Regular = Template.bind({});

export const CustomTitle = Template.bind({});

CustomTitle.args = {
  title: 'Agent Icon',
  name: 'agents',
};

export const SlottedContent = Template.bind({});
SlottedContent.args = {
  slot: html`<p>Slotted content</p>`,
};
SlottedContent.argTypes = {
  slot: { table: { disable: true } },
};
