import CCBySA from '@components/atoms/icons/cc-by-sa';
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { IntlProvider } from 'react-intl';
import CopyrightComponent from './copyright';

export default {
  title: 'Atoms/Layout',
  component: CopyrightComponent,
  argTypes: {
    dates: {
      description: 'The copyright dates.',
      type: {
        name: 'object',
        required: true,
        value: {},
      },
    },
    icon: {
      control: {
        type: null,
      },
      description: 'The copyright icon.',
      type: {
        name: 'string',
        required: true,
      },
    },
    owner: {
      control: {
        type: 'text',
      },
      description: 'The copyright owner',
      type: {
        name: 'string',
        required: true,
      },
    },
  },
} as ComponentMeta<typeof CopyrightComponent>;

const Template: ComponentStory<typeof CopyrightComponent> = (args) => (
  <IntlProvider locale="en">
    <CopyrightComponent {...args} />
  </IntlProvider>
);

export const Copyright = Template.bind({});
Copyright.args = {
  dates: {
    start: '2012',
    end: '2022',
  },
  icon: <CCBySA />,
  owner: 'Your name',
};
bsite.</td><td class='sub right'>Armand Philippot</td></tr></table>
<table class='tabs'><tr><td>
<a href='/www.armandphilippot.com/?h=v1.0.0'>summary</a><a href='/www.armandphilippot.com/refs/?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>refs</a><a href='/www.armandphilippot.com/log/public/prism/prism-brainfuck.min.js?h=v1.0.0'>log</a><a class='active' href='/www.armandphilippot.com/tree/public/prism/prism-brainfuck.min.js?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>tree</a><a href='/www.armandphilippot.com/commit/public/prism/prism-brainfuck.min.js?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>commit</a><a href='/www.armandphilippot.com/diff/public/prism/prism-brainfuck.min.js?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>diff</a><a href='/www.armandphilippot.com/stats/public/prism/prism-brainfuck.min.js?h=v1.0.0'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/public/prism/prism-brainfuck.min.js'>
<input type='hidden' name='h' value='v1.0.0'/><input type='hidden' name='id' value='519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>root</a>/<a href='/www.armandphilippot.com/tree/public?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>public</a>/<a href='/www.armandphilippot.com/tree/public/prism?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>prism</a>/<a href='/www.armandphilippot.com/tree/public/prism/prism-brainfuck.min.js?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>prism-brainfuck.min.js</a></div><div class='content'>blob: d2245e7ede6448d390622f84e2046621039d5d3d (<a href='/www.armandphilippot.com/plain/public/prism/prism-brainfuck.min.js?h=v1.0.0&amp;id=519b1439dce3f25dd38cd0d0f82fecd10f28dcc8'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
</pre></td>
<td class='lines'><pre><code>