<commit_before>import QBtn from '../btn/QBtn.js'
import QIcon from '../icon/QIcon.js'
import FabMixin from './fab-mixin.js'
import ModelToggleMixin from '../../mixins/model-toggle.js'

export default {
  name: 'QFab',
  mixins: [FabMixin, ModelToggleMixin],
  provide () {
    return {
      __qFabClose: evt => this.hide(evt).then(() => {
        this.$refs.trigger && this.$refs.trigger.$el && this.$refs.trigger.$el.focus()
        return evt
      })
    }
  },
  props: {
    icon: String,
    activeIcon: String,
    direction: {
      type: String,
      default: 'right'
    }
  },
  watch: {
    $route () {
      this.hide()
    }
  },
  created () {
    if (this.value) {
      this.show()
    }
  },
  render (h) {
    return h('div', {
      staticClass: 'q-fab z-fab row inline justify-center',
      'class': {
        'q-fab-opened': this.showing
      }
    }, [
      h(QBtn, {
        ref: 'trigger',
        props: {
          fab: true,
          outline: this.outline,<commit_msg>feat: [Request] QFab prop to persist on route change #2589<commit_after>import QBtn from '../btn/QBtn.js'
import QIcon from '../icon/QIcon.js'
import FabMixin from './fab-mixin.js'
import ModelToggleMixin from '../../mixins/model-toggle.js'

export default {
  name: 'QFab',
  mixins: [FabMixin, ModelToggleMixin],
  provide () {
    return {
      __qFabClose: evt => this.hide(evt).then(() => {
        this.$refs.trigger && this.$refs.trigger.$el && this.$refs.trigger.$el.focus()
        return evt
      })
    }
  },
  props: {
    icon: String,
    activeIcon: String,
    direction: {
      type: String,
      default: 'right'
    },
    persistent: Boolean
  },
  watch: {
    $route () {
      !this.persistent && this.hide()
    }
  },
  created () {
    if (this.value) {
      this.show()
    }
  },
  render (h) {
    return h('div', {
      staticClass: 'q-fab z-fab row inline justify-center',
      'class': {
        'q-fab-opened': this.showing
      }
    }, [
      h(QBtn, {
        ref: 'trigger',
        props: {
          fab: true,
          outline: this.outline,
{'fraction_non_alphanumeric': 0.16714422158548234, 'fraction_numerical': 0.0019102196752626551, 'mean_word_length': 2.005738880918221, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3681715', 'n_tokens_mistral': 733, 'n_tokens_neox': 725, 'n_words': 153}