<commit_before>import Utils from '../utils/utils';
import Mixins from '../utils/mixins';

export default {
  name: 'f7-message',
  props: {
    id: [String, Number],
    text: String,
    name: String,
    avatar: String,
    type: {
      type: String,
      default: 'sent',
    },
    image: String,
    header: String,
    footer: String,
    textHeader: String,
    textFooter: String,
    first: Boolean,
    last: Boolean,
    tail: Boolean,
    sameName: Boolean,
    sameHeader: Boolean,
    sameFooter: Boolean,
    sameAvatar: Boolean,
    typing: Boolean,
    ...Mixins.colorProps,
  },
  componentDidCreate() {
    this.onClickBound = this.onClick.bind(this);
    this.onNameClickBound = this.onNameClick.bind(this);
    this.onTextClickBound = this.onTextClick.bind(this);
    this.onAvatarClickBound = this.onAvatarClick.bind(this);
    this.onHeaderClickBound = this.onHeaderClick.bind(this);
    this.onFooterClickBound = this.onFooterClick.bind(this);
    this.onBubbleClickBound = this.onBubbleClick.bind(this);
  },
  render() {
    const self = this;

    const {
      text,
      name,
      avatar,
      image,
      header,
      footer,
      textHeader,
      textFooter,
      typing,
      id,
      style,
    } = self.props;

    const {
      start: slotsStart,
      end: slotsEnd,
      default: slotsDefault,
      'content-start': slotsContentStart,
      'content-end': slotsContentEnd,
      avatar: slotsAvatar,
      name: slotsName,
      header: slotsHeader,
      footer: slotsFooter,
      image: slotsImage,
      text: slotsText,
      'text-header': slotsTextHeader,
      'text-footer': slotsTextFooter,
      'bubble-start': slotsBubbleStart,
      'bubble-end': slotsBubbleEnd,
    } = self.slots;

    return (
      <div id={id} style={style} className={self.classes} onClick={self.onClickBound}>
        {slotsStart}
        {(avatar || slotsAvatar) &&
          <div
            className="message-avatar"
            style={{ 'background-image': avatar && `url(${avatar})` }}
            onClick={self.onAvatarClickBound}
          >{slotsAvatar}</div><commit_msg>Phenome Message fix style prop<commit_after>import Utils from '../utils/utils';
import Mixins from '../utils/mixins';

export default {
  name: 'f7-message',
  props: {
    id: [String, Number],
    text: String,
    name: String,
    avatar: String,
    type: {
      type: String,
      default: 'sent',
    },
    image: String,
    header: String,
    footer: String,
    textHeader: String,
    textFooter: String,
    first: Boolean,
    last: Boolean,
    tail: Boolean,
    sameName: Boolean,
    sameHeader: Boolean,
    sameFooter: Boolean,
    sameAvatar: Boolean,
    typing: Boolean,
    ...Mixins.colorProps,
  },
  componentDidCreate() {
    this.onClickBound = this.onClick.bind(this);
    this.onNameClickBound = this.onNameClick.bind(this);
    this.onTextClickBound = this.onTextClick.bind(this);
    this.onAvatarClickBound = this.onAvatarClick.bind(this);
    this.onHeaderClickBound = this.onHeaderClick.bind(this);
    this.onFooterClickBound = this.onFooterClick.bind(this);
    this.onBubbleClickBound = this.onBubbleClick.bind(this);
  },
  render() {
    const self = this;

    const {
      text,
      name,
      avatar,
      image,
      header,
      footer,
      textHeader,
      textFooter,
      typing,
      id,
      style,
    } = self.props;

    const {
      start: slotsStart,
      end: slotsEnd,
      default: slotsDefault,
      'content-start': slotsContentStart,
      'content-end': slotsContentEnd,
      avatar: slotsAvatar,
      name: slotsName,
      header: slotsHeader,
      footer: slotsFooter,
      image: slotsImage,
      text: slotsText,
      'text-header': slotsTextHeader,
      'text-footer': slotsTextFooter,
      'bubble-start': slotsBubbleStart,
      'bubble-end': slotsBubbleEnd,
    } = self.slots;

    return (
      <div id={id} style={style} className={self.classes} onClick={self.onClickBound}>
        {slotsStart}
        {(avatar || slotsAvatar) &&
          <div
            className="message-avatar"
            style={{ backgroundImage: avatar && `url(${avatar})` }}
            onClick={self.onAvatarClickBound}
          >{slotsAvatar}</div>
{'fraction_non_alphanumeric': 0.12435354960037612, 'fraction_numerical': 0.0004701457451810061, 'mean_word_length': 2.5165289256198347, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7130924', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1347, 'n_words': 273}