<commit_before>import React from 'react';
import classNames from 'classnames';
import {classList, prefix} from './../../libs';

/**
 * Adds an action component to CLCard.
 * @param {string} [addClasses] Adds optional classes.
 * @param {string} [alignItems="center"]
 * @param {string} [background] Sets the background color of the card.
 * @param {string} [boxSizing="border-box"] Specifies the border type of the card.
 * @param {string} [display] Specifies the CSS display value.
 * @param {string} [height] Specifies the CSS height value.
 * @param {Boolean} [hideOnLargeScreen=false]
 * @param {Boolean} [hideOnSmallScreen=false]
 * @param {string} [id]
 * @param {string} [padding] Specifies the CSS padding value.
 * @param {Boolean} [withBorder=false] Adds Material border.
 */

export class CLCardAction extends React.Component {
  render() {
    const {
      withBorder = false,
      display,
      boxSizing = 'border-box',
      alignItems = 'center',
      height,
      padding,
      hideOnLargeScreen,
      hideOnSmallScreen,
      background,
      classes,
      addClasses,
      id,
      children,
      snackbar
    } = this.props;
    const defaultClass = `${prefix}-card-action`;
    const className = classNames(
      'mdl-card__actions',
      {
        'mdl-card--border': withBorder,
        'mdl-layout--small-screen-only': hideOnLargeScreen,
        'mdl-layout--large-screen-only': hideOnSmallScreen
      },
      defaultClass,
      classList(classes, defaultClass),
      classList(addClasses, defaultClass)
    );
    const style = {
      display,
      boxSizing,
      alignItems,
      height,
      padding,
      background
    };
    const attributes = {
      className,
      id,
      style
    };
    return (
      <div {...attributes}>
        {
          React.Children.map(children, child => (typeof child === 'string' ? child :
            React.cloneElement(child, {
              classes,
              snackbar
            })<commit_msg>Done with card action<commit_after>import React from 'react';
import classNames from 'classnames';
import random from 'random-js';
import {classList, prefix} from './../../libs';

/**
 * Adds an action component to CLCard.
 * @param {string}  [addClasses] Adds optional classes.
 * @param {string}  [alignItems="center"]
 * @param {string}  [background] Sets the background color of the card.
 * @param {string}  [boxSizing="border-box"] Specifies the border type of the card.
 * @param {string}  [display] Specifies the CSS display value.
 * @param {string}  [height] Specifies the CSS height value.
 * @param {Boolean} [hideOnLargeScreen=false]
 * @param {Boolean} [hideOnSmallScreen=false]
 * @param {string}  [id]
 * @param {string}  [padding] Specifies the CSS padding value.
 * @param {Boolean} [withBorder=false] Adds Material border.
 *
 */

export class CLCardAction extends React.Component {
  render() {
    const r = random();

    // Params

    const {

      // general params

      id = `card-action-${r.string(10)}`,
      generalClassName,
      specificClassName,
      style,
      children,
      snackbar,
      hideOnLargeScreen,
      hideOnSmallScreen,

      // other params

      alignItems = 'center',
      background,
      boxSizing = 'border-box',
      display,
      height,
      padding,
      withBorder = false
    } = this.props;

    // Other imports and initialization

    // ID manipulation

    // Default Class

    const defaultClass = `${prefix}-card-action`;

    // Children manipulation and checking

    // Classnames

    const className = classNames(
      'mdl-card__actions',
      {
        'mdl-card--border': withBorder,
        'mdl-layout--small-screen-only': hideOnLargeScreen,
        'mdl-layout--large-screen-only': hideOnSmallScreen
      },
      defaultClass,
      classList(generalClassName, 'card-action'),
      specificClassName
    );

    // Styles

    const styleCardAction = Object.assign({}, {
      display,
      boxSizing,
      alignItems,
      height,
      padding,
      background
    }, style);

    // Refs

    // Attributes

    const attributes = {
      id,
      className,
      style: styleCardAction
    };

    // Render Functions

    // Render Return

    return (
      <div {...attributes}>
        {
          React.Children.map(children, child => (typeof child === 'string' ? child :
            React.cloneElement(child, {
              generalClassName,
              snackbar
            })
{'fraction_non_alphanumeric': 0.11949265687583445, 'fraction_numerical': 0.0004450378282153983, 'mean_word_length': 2.3950151057401814, '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': '827903', 'n_tokens_mistral': 1294, 'n_tokens_neox': 1271, 'n_words': 349}