<commit_before>import React from "react";
import { ScrollView } from "react-native";
import {
  mockLeadOneAndFourSlice,
  mockCommentLeadAndCartoonSlice,
  mockLeadOneFullWidthSlice,
  mockLeadOneAndOneSlice,
  mockLeadTwoNoPicAndTwoSlice,
  mockLeadersSlice,
  mockSecondaryOneSlice,
  mockSecondaryFourSlice,
  mockListTwoAndSixNoPicSlice,
  mockSecondaryOneAndFourSlice,
  mockSecondaryTwoAndTwoSlice,
  mockSecondaryTwoNoPicAndTwoSlice,
  mockPuzzleSlice
} from "@times-components/fixture-generator";
import Responsive from "@times-components/responsive";
import {
  CommentLeadAndCartoonSlice,
  LeadOneAndFourSlice,
  LeadOneAndOneSlice,
  LeadOneFullWidthSlice,
  LeadTwoNoPicAndTwoSlice,
  ListTwoAndSixNoPicSlice,
  SecondaryOneSlice,
  SecondaryFourSlice,
  SecondaryOneAndFourSlice,
  SecondaryTwoAndTwoSlice,
  SecondaryTwoNoPicAndTwoSlice,
  LeadersSlice,
  PuzzleSlice
} from "./src/slices";

const preventDefaultedAction = decorateAction =>
  decorateAction([
    ([e, ...args]) => {
      e.preventDefault();
      return ["[SyntheticEvent (storybook prevented default)]", ...args];
    }
  ]);

const renderSlice = (Component, data) => (_, { decorateAction }) => (
  <Responsive>
    <ScrollView>
      <Component
        onPress={preventDefaultedAction(decorateAction)("onPress")}
        slice={data}
      />
    </ScrollView>
  </Responsive>
);

const sliceStories = [
  {
    mock: mockLeadOneAndFourSlice(),
    name: "Lead One And Four (IJJJJ)",
    Slice: LeadOneAndFourSlice
  },
  {
    mock: mockLeadOneAndOneSlice(),
    name: "Lead One And One (AB)",
    Slice: LeadOneAndOneSlice
  },
  {
    mock: mockLeadOneFullWidthSlice(),
    name: "Lead One Full Width (Mobile: A, Tablet: R)",
    Slice: LeadOneFullWidthSlice
  },
  {
    mock: mockLeadTwoNoPicAndTwoSlice(),
    name: "Lead Two no pic and Two (FBDE)",
    Slice: LeadTwoNoPicAndTwoSlice
  },
  {
    mock: mockSecondaryOneSlice(),
    name: "Secondary One (A)",
    Slice: SecondaryOneSlice
  },
  {
    mock: mockSecondaryOneAndFourSlice(),<commit_msg>fix: lead 1 and 1 slice title in storybook (#1728)<commit_after>import React from "react";
import { ScrollView } from "react-native";
import {
  mockLeadOneAndFourSlice,
  mockCommentLeadAndCartoonSlice,
  mockLeadOneFullWidthSlice,
  mockLeadOneAndOneSlice,
  mockLeadTwoNoPicAndTwoSlice,
  mockLeadersSlice,
  mockSecondaryOneSlice,
  mockSecondaryFourSlice,
  mockListTwoAndSixNoPicSlice,
  mockSecondaryOneAndFourSlice,
  mockSecondaryTwoAndTwoSlice,
  mockSecondaryTwoNoPicAndTwoSlice,
  mockPuzzleSlice
} from "@times-components/fixture-generator";
import Responsive from "@times-components/responsive";
import {
  CommentLeadAndCartoonSlice,
  LeadOneAndFourSlice,
  LeadOneAndOneSlice,
  LeadOneFullWidthSlice,
  LeadTwoNoPicAndTwoSlice,
  ListTwoAndSixNoPicSlice,
  SecondaryOneSlice,
  SecondaryFourSlice,
  SecondaryOneAndFourSlice,
  SecondaryTwoAndTwoSlice,
  SecondaryTwoNoPicAndTwoSlice,
  LeadersSlice,
  PuzzleSlice
} from "./src/slices";

const preventDefaultedAction = decorateAction =>
  decorateAction([
    ([e, ...args]) => {
      e.preventDefault();
      return ["[SyntheticEvent (storybook prevented default)]", ...args];
    }
  ]);

const renderSlice = (Component, data) => (_, { decorateAction }) => (
  <Responsive>
    <ScrollView>
      <Component
        onPress={preventDefaultedAction(decorateAction)("onPress")}
        slice={data}
      />
    </ScrollView>
  </Responsive>
);

const sliceStories = [
  {
    mock: mockLeadOneAndFourSlice(),
    name: "Lead One And Four (IJJJJ)",
    Slice: LeadOneAndFourSlice
  },
  {
    mock: mockLeadOneAndOneSlice(),
    name: "Lead One And One (Mobile: AB, Tablet: UC)",
    Slice: LeadOneAndOneSlice
  },
  {
    mock: mockLeadOneFullWidthSlice(),
    name: "Lead One Full Width (Mobile: A, Tablet: R)",
    Slice: LeadOneFullWidthSlice
  },
  {
    mock: mockLeadTwoNoPicAndTwoSlice(),
    name: "Lead Two no pic and Two (FBDE)",
    Slice: LeadTwoNoPicAndTwoSlice
  },
  {
    mock: mockSecondaryOneSlice(),
    name: "Secondary One (A)",
    Slice: SecondaryOneSlice
  },
  {
    mock: mockSecondaryOneAndFourSlice(),
{'fraction_non_alphanumeric': 0.10639324487334137, 'fraction_numerical': 0.0014475271411338963, 'mean_word_length': 4.322207958921695, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, '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': '4663614', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1312, 'n_words': 263}