<commit_before>import {Hooks} from 'PluginSDK';
import React from 'react';

import CreateServiceModalServicePickerOptionContent from './CreateServiceModalServicePickerOptionContent';
import CreateServiceModalServicePickerOptionImage from './CreateServiceModalServicePickerOptionImage';
import Panel from './Panel';

function getChildOfType(children, type) {
  return React.Children.toArray(children).filter(
    (child) => child.type === type
  );
}

function CreateServiceModalServicePickerOption({children, onOptionSelect}) {
  const columnClass = Hooks.applyFilter(
    'servicePickerOptionColumnClasses', 'column-12 column-small-4'
  );

  return (
    <div className={`create-service-modal-service-picker-option panel-grid-item ${columnClass}`}>
      <Panel className="panel-interactive clickable"
        contentClass={[
          'horizontal-center panel-cell flush-top',
          {
            'panel-cell-short': false,
            'panel-cell-shorter': false
          }
        ]}
        heading={
          getChildOfType(children, CreateServiceModalServicePickerOptionImage)
        }
        headingClass={[
          'panel-cell-borderless horizontal-center panel-cell',
          {
            'panel-cell-light': false,
            'panel-cell-shorter': false
          }
        ]}
        onClick={onOptionSelect}>
        {getChildOfType(children, CreateServiceModalServicePickerOptionContent)}
      </Panel>
    </div>
  );
}

module.exports = CreateServiceModalServicePickerOption;<commit_msg>Use variables for classes<commit_after>import {Hooks} from 'PluginSDK';
import React from 'react';

import CreateServiceModalServicePickerOptionContent from './CreateServiceModalServicePickerOptionContent';
import CreateServiceModalServicePickerOptionImage from './CreateServiceModalServicePickerOptionImage';
import Panel from './Panel';

function getChildOfType(children, type) {
  return React.Children.toArray(children).filter(
    (child) => child.type === type
  );
}

function CreateServiceModalServicePickerOption({children, onOptionSelect}) {
  const columnClass = Hooks.applyFilter(
    'servicePickerOptionColumnClasses', 'column-12 column-small-4'
  );
  const contentClasses = [
    'horizontal-center panel-cell flush-top',
    {
      'panel-cell-short': false,
      'panel-cell-shorter': false
    }
  ];
  const headingClasses = [
    'panel-cell-borderless horizontal-center panel-cell',
    {
      'panel-cell-light': false,
      'panel-cell-shorter': false
    }
  ];

  return (
    <div className={`create-service-modal-service-picker-option panel-grid-item ${columnClass}`}>
      <Panel className="panel-interactive clickable"
        contentClass={contentClasses}
        heading={
          getChildOfType(children, CreateServiceModalServicePickerOptionImage)
        }
        headingClass={headingClasses}
        onClick={onOptionSelect}>
        {getChildOfType(children, CreateServiceModalServicePickerOptionContent)}
      </Panel>
    </div>
  );
}

module.exports = CreateServiceModalServicePickerOption;
{'fraction_non_alphanumeric': 0.10915032679738562, 'fraction_numerical': 0.00196078431372549, 'mean_word_length': 3.6661585365853657, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '6200076', 'n_tokens_mistral': 812, 'n_tokens_neox': 806, 'n_words': 148}