'use strict';

const GmSeePlaceholderKey = Symbol("GmSeePlaceholder");
const vSee = {
  mounted(el, binding) {
    const placeholder = document.createComment("v-see");
    el[GmSeePlaceholderKey] = placeholder;
    if (!binding.value) {
      el.parentNode && el.parentNode.replaceChild(placeholder, el);
    }
  },
  updated(el, binding) {
    const placeholder = el[GmSeePlaceholderKey];
    if (binding.value && !el.isConnected) {
      placeholder?.parentNode && placeholder.parentNode.replaceChild(el, placeholder);
    } else if (!binding.value && el.isConnected) {
      placeholder && el.parentNode && el.parentNode.replaceChild(placeholder, el);
    }
  }
};

exports.vSee = vSee;
//# sourceMappingURL=directive.js.map
