import docs from "./pn-date-and-time-docs.json";

export default {
  title: 'Components/Input/Date and Time',
  parameters: {
    notes: docs,
    layout: 'centered',
  },
};

const Template = ({ ...args }) => {
  return `
    <pn-date-and-time
      language-code="${args.languageCode}"
      date-and-time-label="${args.dateAndTimeLabel}"
      date-days-from-today="${args.dateDaysFromToday}"
      valid-time-range-minutes="${args.validTimeRangeMinutes}"
      error-message="${args.errorMessage}"
      date-helper-text="${args.dateHelpertext}"
      time-helper-text="${args.timeHelpertext}"
      disable-weekends="${args.disableWeekends}"
      date-placeholder="${args.datePlaceholder}"
      disabled-dates="${args.disabledDates}"
      >
    </pn-date-and-time>
    `;
};

export const Primary = Template.bind({});
Primary.args = {
  languageCode: 'sv',
  dateAndTimeLabel: 'Label Text',
  dateDaysFromToday: 1,
  validTimeRangeMinutes: 30,
  errorMessage: '',
  dateHelpertext: 'Date helpertext',
  timeHelpertext: 'Time helpertext',
  disableWeekends: 'true',
  datePlaceholder: 'YYYY-MM-DD',
  disabledDates: '',
};
