import docs from "./pn-product-card-docs.json";

export default {
  title: 'Components/Widgets/Product Card',
  parameters: {
    notes: docs,
  },
};

const Template = ({ ...args }) => {
  return `
    <div style="max-width: 30em; margin:1em auto 0;">
      <pn-product-card>
        <div slot="content">
          <h3>${args.heading}</h3>
          <p>${args.description}</p>
        </div>
        <pn-product-card-info label="${args.info1label}" text="${args.info1value}"></pn-product-card-info>
        <pn-product-card-info label="${args.info2label}" text="${args.info2value}"></pn-product-card-info>
        <pn-product-card-price slot="price" label="${args.pricelabel}" amount="${args.priceamount}" currency="${args.pricecurrency}"></pn-product-card-price>
      </pn-product-card>
    </div>
  `;
};

export const Primary = Template.bind({});
Primary.args = {
  heading: 'Skicka hem',
  description: 'Lorem ipsum dolor sit amet',
  info1label: 'Maxvikt',
  info1value: '250g',
  info2label: 'Max längd + bredd + höjd',
  info2value: '90cm',
  pricelabel: 'Skicka direkt',
  priceamount: '52',
  pricecurrency: 'kr',
};

export const Secondary = Template.bind({});
Secondary.args = {
  heading: '',
  description: '',
  info1label: 'Maxvikt',
  info1value: '250g',
  info2label: 'Max längd + bredd + höjd',
  info2value: '90cm',
  pricelabel: 'Skicka direkt',
  priceamount: '52',
  pricecurrency: 'kr',
};
