import {{ camelCase bundle }}Twig from './{{ kebabCase bundle }}.twig';
import {{ camelCase bundle }}Data from './{{ kebabCase bundle }}.yml';
import './{{ kebabCase bundle }}.js';

import drupalAttribute from 'drupal-attribute';

/**
 * Storybook Definition.
 */
export default { title: '/{{ titleCase bundle }}' };

export const {{ camelCase bundle }} = () => {
  let {{ entityType }}Classes = [...{{ camelCase bundle }}Data.{{ entityType }}_attributes.class];
  let {{ entityType }}Attributes = Object.assign({}, {{ camelCase bundle }}Data.{{ entityType }}_attributes);

  {{ entityType }}Attributes.class = {{ entityType }}Classes;

  return {{ camelCase bundle }}Twig({
    ...{{ camelCase bundle }}Data,
    attributes: new drupalAttribute(Object.entries({{ entityType }}Attributes)),
  });
}
