import projectTeaserHorizontalTwig from './node.project.teaser-horizontal.twig';
import projectTeaserHorizontalData from './node.project.teaser-horizontal.yml';
import './node.project.teaser-horizontal.js';

import imgTwig from '@ui-base/img/_img.twig';

/**
 * Storybook Definition.
 */
export default {
  title: 'Content Types/Project/Teaser Horizontal',
};

export const teaserHorizontal = (args) => {
  // Create deep copy of data and merge args.
  let data = JSON.parse(JSON.stringify(projectTeaserHorizontalData ?? {}));
  data = Object.assign(data, args);

  return projectTeaserHorizontalTwig({
    ...data,
    node_teaser_field_erm_page_image: imgTwig({ image_src: data.node_teaser_field_erm_page_image })
  });
}
teaserHorizontal.args = projectTeaserHorizontalData;
