<commit_before>import QItem from './QItem'
import QItemMain from './QItemMain'
import QItemSide from './QItemSide'

function push (child, h, name, slot, replace, conf) {
  if (slot && replace) {
    child.push(h(name, slot))
    return
  }
  let props, v = false
  if (!slot) {
    for (let p in conf) {
      if (conf.hasOwnProperty(p)) {
        v = conf[p]
        if (v !== void 0 && v !== true) {
          props = true
          break
        }
      }
    }
  }
  if (props || slot) {
    child.push(h(name, props ? {props: conf} : {}, slot))
  }
}

export default {
  name: 'q-item-wrapper',
  functional: true,
  props: {
    cfg: {
      type: Object,
      default () {
        return {}
      }
    },
    slotReplace: Boolean
  },
  render (h, ctx) {
    const
      cfg = ctx.props.cfg,
      replace = ctx.props.slotReplace,
      slot = ctx.slots(),
      child = []

    push(child, h, QItemSide, slot.left, replace, {
      icon: cfg.icon,
      avatar: cfg.avatar,
      letter: cfg.letter,
      image: cfg.image
    })

    push(child, h, QItemMain, slot.main, replace, {
      label: cfg.label,
      sublabel: cfg.sublabel,
      labelLines: cfg.labelLines,
      sublabelLines: cfg.sublabelLines,
      inset: cfg.inset
    })

    push(child, h, QItemSide, slot.right, replace, {
      right: true,
      icon: cfg.rightIcon,
      avatar: cfg.rightAvatar,
      letter: cfg.rightLetter,
      image: cfg.rightImage,
      stamp: cfg.stamp
    })

    if (slot.default) {
      child.push(slot.default)
    }

    ctx.data.props = cfg
    return h(QItem, ctx.data, child)
  }
}
<commit_msg>feat: Add iconColor and rightIconColor as options to QSelect items #913<commit_after>import QItem from './QItem'
import QItemMain from './QItemMain'
import QItemSide from './QItemSide'

function push (child, h, name, slot, replace, conf) {
  if (slot && replace) {
    child.push(h(name, slot))
    return
  }
  let props, v = false
  if (!slot) {
    for (let p in conf) {
      if (conf.hasOwnProperty(p)) {
        v = conf[p]
        if (v !== void 0 && v !== true) {
          props = true
          break
        }
      }
    }
  }
  if (props || slot) {
    child.push(h(name, props ? {props: conf} : {}, slot))
  }
}

export default {
  name: 'q-item-wrapper',
  functional: true,
  props: {
    cfg: {
      type: Object,
      default () {
        return {}
      }
    },
    slotReplace: Boolean
  },
  render (h, ctx) {
    const
      cfg = ctx.props.cfg,
      replace = ctx.props.slotReplace,
      slot = ctx.slots(),
      child = []

    push(child, h, QItemSide, slot.left, replace, {
      icon: cfg.icon,
      color: cfg.iconColor,
      avatar: cfg.avatar,
      letter: cfg.letter,
      image: cfg.image
    })

    push(child, h, QItemMain, slot.main, replace, {
      label: cfg.label,
      sublabel: cfg.sublabel,
      labelLines: cfg.labelLines,
      sublabelLines: cfg.sublabelLines,
      inset: cfg.inset
    })

    push(child, h, QItemSide, slot.right, replace, {
      right: true,
      icon: cfg.rightIcon,
      color: cfg.rightIconColor,
      avatar: cfg.rightAvatar,
      letter: cfg.rightLetter,
      image: cfg.rightImage,
      stamp: cfg.stamp
    })

    if (slot.default) {
      child.push(slot.default)
    }

    ctx.data.props = cfg
    return h(QItem, ctx.data, child)
  }
}

{'fraction_non_alphanumeric': 0.1373544341594506, 'fraction_numerical': 0.001492982979994028, 'mean_word_length': 2.0316742081447963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5507846', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1150, 'n_words': 288}