{"size": 2093, "ext": "js", "max_stars_repo_path": "src/modules/organisation_teaser/organisation_teaser.data.js", "max_stars_repo_name": "esthrbrunnr/frontend-designsystem", "max_stars_repo_stars_event_min_datetime": "2021-12-21T08:45:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-14T07:54:29.000Z", "max_issues_repo_path": "src/modules/organisation_teaser/organisation_teaser.data.js", "max_issues_repo_name": "esthrbrunnr/frontend-designsystem", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/modules/organisation_teaser/organisation_teaser.data.js", "max_forks_repo_name": "esthrbrunnr/frontend-designsystem", "max_forks_repo_forks_event_min_datetime": "2021-12-21T13:41:34.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-21T13:41:34.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.6712328767, "max_line_length": 180, "alphanum_fraction": 0.6445293837}
const _ = require('lodash');
const dataHelper = require('@unic/estatico-data');
const { handlebars } = require('@unic/estatico-handlebars');
const defaultData = require('../../data/default.data.js');
const templateConverter = require('../../../gulp/helpers/templateConverter');

const template = dataHelper.getFileContent('organisation_teaser.hbs');
const data = _.merge({}, defaultData, {
  meta: {
    title: 'OrganisationTeaser',
    className: 'OrganisationTeaser',
    jira: 'CZHDEV-497',
    label: 'Teaser',
    documentation: dataHelper.getDocumentation('README.md'),
  },
  props: {
    orgTitle: 'Kantonsrat',
    orgLead: 'Der Kantonsrat ist die Legislative. Er beschliesst Gesetze und überwacht die Tätigkeiten des Regierungsrats.',
    url: '#',
  },
});
const variants = _.mapValues({
  default: {
    meta: {
      title: 'Kantonsrat',
      desc: '',
    },
  },
  courts: {
    meta: {
      title: 'Gerichte',
      desc: '',
    },
    props: {
      orgTitle: 'Gerichte',
      orgLead: 'Die Gerichte des Kantons Zürich sprechen Recht anhand der Gesetze auf kantonaler und nationaler Ebene. Das höchste Gericht des Kantons Zürich ist das Obergericht.',
      url: '#',
    },
  },
  municipialities: {
    meta: {
      title: 'Gemeinden',
      desc: '',
    },
    props: {
      orgTitle: 'Gemeinden',
      orgLead: 'Die Gemeinden sind die kleinste politische Behörde in der Schweiz. Im Sinne des Föderalismus kommt ihnen eine wichtige Rolle zugute.',
      url: '#',
    },
  },
}, (variant) => {
  const variantProps = _.merge({}, data, variant).props;
  const compiledVariant = () => handlebars.compile(template)(variantProps);
  const variantData = _.merge({}, data, variant, {
    meta: {
      demo: compiledVariant,

      code: {
        template: templateConverter(template),
        handlebars: dataHelper.getFormattedHandlebars(template),
        html: dataHelper.getFormattedHtml(compiledVariant()),
        data: dataHelper.getFormattedJson(variantProps),
      },
    },
  });

  return variantData;
});

data.variants = variants;

module.exports = data;
