import docs from "./pn-proxio-findprice-docs.json";

export default {
  title: 'Components/Proxio / Find Price',
  parameters: {
    notes: docs,
  },
};

const Template = ({ ...args }) => {
  return `
    <div style="max-width: 100%; margin:1em auto 0;">
      <pn-proxio-findprice
        market="${args.market}"
        language="${args.language}"
        cache="${args.cache}">
      </pn-proxio-findprice>
    </div>
  `;
};

export const Primary = Template.bind({});
Primary.args = {
  language: 'da',
  market: 'dk',
  cache: true,
};

const ProxioWithCountry = ({ ...args }) => {
  return `
    <div style="max-width: 100%; margin:1em auto 0;">
      <pn-proxio-findprice
        market="${args.market}"
        language="${args.language}"
        cache="${args.cache}"
        show-international="${args.showInternational}"
        max-abroad-kg="${args.maxAbroadKg}">
      </pn-proxio-findprice>
    </div>
  `;
};

export const ProxioWithCountryPrimary = ProxioWithCountry.bind({});
ProxioWithCountryPrimary.args = {
  language: 'da',
  market: 'dk',
  cache: true,
  showInternational: true,
  maxAbroadKg: 20,
};
