import {
  Canvas,
  Meta,
  Story,
  ArgsTable
} from '@storybook/addon-docs'
import RplSocialShare from './RplSocialShare.vue'
import { RplSocialShareNetworks } from './constants'
import { a11yStoryCheck } from './../../../stories/interactions.js'

export const SingleTemplate = (args) => ({
  components: { RplSocialShare },
  setup() {
    return { args }
  },
  template: '<RplSocialShare v-bind="args" />'
})

<Meta title='Core/Navigation/Social share' component={RplSocialShare} />

# Social share

<ArgsTable of={RplSocialShare} />

<Canvas>
  <Story
    name='Social share'
    play={a11yStoryCheck}
    args={{
      networks: Object.keys(RplSocialShareNetworks),
      pagetitle: 'Sample page title'
    }}
  >
    {SingleTemplate.bind()}
  </Story>
</Canvas>
