import { extend } from '../vue';
import { useParentMixin } from './use-parent';
import { getScopeId } from '../utils/get-scope-id';

// @vue/component
const scopedStyleMixin = extend({
  mixins: [useParentMixin],
  computed: {
    scopedStyleAttrs() {
      const scopeId = getScopeId(this.bvParent);
      return scopeId ? {
        [scopeId]: ''
      } : {};
    }
  }
});

export { scopedStyleMixin };
