'use strict';

// Riot.js constants that can be used across more modules

const COMPONENTS_IMPLEMENTATION_MAP = new Map(),
  DOM_COMPONENT_INSTANCE_PROPERTY = Symbol('riot-component'),
  PLUGINS_SET = new Set(),
  IS_DIRECTIVE = 'is',
  VALUE_ATTRIBUTE = 'value',
  REF_ATTRIBUTE = 'ref',
  EVENT_ATTRIBUTE_RE = /^on/,
  MOUNT_METHOD_KEY = 'mount',
  UPDATE_METHOD_KEY = 'update',
  UNMOUNT_METHOD_KEY = 'unmount',
  SHOULD_UPDATE_KEY = 'shouldUpdate',
  ON_BEFORE_MOUNT_KEY = 'onBeforeMount',
  ON_MOUNTED_KEY = 'onMounted',
  ON_BEFORE_UPDATE_KEY = 'onBeforeUpdate',
  ON_UPDATED_KEY = 'onUpdated',
  ON_BEFORE_UNMOUNT_KEY = 'onBeforeUnmount',
  ON_UNMOUNTED_KEY = 'onUnmounted',
  PROPS_KEY = 'props',
  STATE_KEY = 'state',
  SLOTS_KEY = 'slots',
  ROOT_KEY = 'root',
  IS_PURE_SYMBOL = Symbol('pure'),
  IS_COMPONENT_UPDATING = Symbol('is_updating'),
  PARENT_KEY_SYMBOL = Symbol('parent'),
  TEMPLATE_KEY_SYMBOL = Symbol('template'),
  ROOT_ATTRIBUTES_KEY_SYMBOL = Symbol('root-attributes');

exports.COMPONENTS_IMPLEMENTATION_MAP = COMPONENTS_IMPLEMENTATION_MAP;
exports.DOM_COMPONENT_INSTANCE_PROPERTY = DOM_COMPONENT_INSTANCE_PROPERTY;
exports.EVENT_ATTRIBUTE_RE = EVENT_ATTRIBUTE_RE;
exports.IS_COMPONENT_UPDATING = IS_COMPONENT_UPDATING;
exports.IS_DIRECTIVE = IS_DIRECTIVE;
exports.IS_PURE_SYMBOL = IS_PURE_SYMBOL;
exports.MOUNT_METHOD_KEY = MOUNT_METHOD_KEY;
exports.ON_BEFORE_MOUNT_KEY = ON_BEFORE_MOUNT_KEY;
exports.ON_BEFORE_UNMOUNT_KEY = ON_BEFORE_UNMOUNT_KEY;
exports.ON_BEFORE_UPDATE_KEY = ON_BEFORE_UPDATE_KEY;
exports.ON_MOUNTED_KEY = ON_MOUNTED_KEY;
exports.ON_UNMOUNTED_KEY = ON_UNMOUNTED_KEY;
exports.ON_UPDATED_KEY = ON_UPDATED_KEY;
exports.PARENT_KEY_SYMBOL = PARENT_KEY_SYMBOL;
exports.PLUGINS_SET = PLUGINS_SET;
exports.PROPS_KEY = PROPS_KEY;
exports.REF_ATTRIBUTE = REF_ATTRIBUTE;
exports.ROOT_ATTRIBUTES_KEY_SYMBOL = ROOT_ATTRIBUTES_KEY_SYMBOL;
exports.ROOT_KEY = ROOT_KEY;
exports.SHOULD_UPDATE_KEY = SHOULD_UPDATE_KEY;
exports.SLOTS_KEY = SLOTS_KEY;
exports.STATE_KEY = STATE_KEY;
exports.TEMPLATE_KEY_SYMBOL = TEMPLATE_KEY_SYMBOL;
exports.UNMOUNT_METHOD_KEY = UNMOUNT_METHOD_KEY;
exports.UPDATE_METHOD_KEY = UPDATE_METHOD_KEY;
exports.VALUE_ATTRIBUTE = VALUE_ATTRIBUTE;
