<commit_before>import {
  withKnobs,
  boolean
} from '@storybook/addon-knobs';

import AposAreaMenu from './AposAreaMenu.vue';
const data = getData();

export default {
  title: 'Area Menu',
  decorators: [ withKnobs ]
};

export const areaMenu = () => {
  const menuFormat = boolean('Menu Items Grouped?', true);
  return {
    data() {
      return {
        index: 0,
        widgetOptions: {
          '@apostrophecms/rich-text': {}
        }
      };
    },
    methods: {
      handler(action) {
        console.log(`heard ${action}`);
      }
    },
    computed: {
      contextMenuOptions() {
        if (menuFormat) {
          return { menu: data.menu };
        } else {
          return { menu: data.menu[1].items };
        }
      }
    },
    components: {
      AposAreaMenu
    },
    template: `
      <AposAreaMenu
        v-on:click="handler"
        :contextMenuOptions="contextMenuOptions"
        :widgetOptions="widgetOptions"
        style="margin-left: 100px;"
      />
    `
  };
};

function getData() {
  return {
    menu: [
      {
        label: 'Layouts',
        items: [
          {
            label: 'Two Column',
            action: 'add-two-column',
            icon: 'view-column-icon'
          },
          {
            label: 'Three Column',
            action: 'add-three-column',
            icon: 'view-column-icon'
          },
          {
            label: 'Two Thirds',
            action: 'add-two-thirds',
            icon: 'view-column-icon'
          },
          {<commit_msg>shorthand<commit_after>import {
  withKnobs,
  boolean
} from '@storybook/addon-knobs';

import AposAreaMenu from './AposAreaMenu.vue';
const data = getData();

export default {
  title: 'Area Menu',
  decorators: [ withKnobs ]
};

export const areaMenu = () => {
  const menuFormat = boolean('Menu Items Grouped?', true);
  return {
    data() {
      return {
        index: 0,
        widgetOptions: {
          '@apostrophecms/rich-text': {}
        }
      };
    },
    methods: {
      handler(action) {
        console.log(`heard ${action}`);
      }
    },
    computed: {
      contextMenuOptions() {
        if (menuFormat) {
          return { menu: data.menu };
        } else {
          return { menu: data.menu[1].items };
        }
      }
    },
    components: {
      AposAreaMenu
    },
    template: `
      <AposAreaMenu
        @click="handler"
        :contextMenuOptions="contextMenuOptions"
        :widgetOptions="widgetOptions"
        style="margin-left: 100px;"
      />
    `
  };
};

function getData() {
  return {
    menu: [
      {
        label: 'Layouts',
        items: [
          {
            label: 'Two Column',
            action: 'add-two-column',
            icon: 'view-column-icon'
          },
          {
            label: 'Three Column',
            action: 'add-three-column',
            icon: 'view-column-icon'
          },
          {
            label: 'Two Thirds',
            action: 'add-two-thirds',
            icon: 'view-column-icon'
          },
          {
{'fraction_non_alphanumeric': 0.1388888888888889, 'fraction_numerical': 0.0032679738562091504, 'mean_word_length': 1.5381426202321724, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1374268', 'n_tokens_mistral': 946, 'n_tokens_neox': 929, 'n_words': 174}