'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-e0159b94.js');
require('./index-6b8d5b3c.js');
const runStore = require('./runStore-1cea6465.js');

const BaseLink = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.routeChange = index.createEvent(this, "routeChange", 7);
    this.style = [];
    this.color = "--cj-color-primary";
    this.hoverColor = "--cj-color-secondary";
    this.decoration = "--cj-link-decoration";
    this.hoverDecoration = "--cj-link-hover-decoration";
  }
  async componentWillLoad() {
    await this.computeStyles();
  }
  async computeStyles() {
    const hash = await (await Promise.resolve().then(function () { return require('./style-0fc3d97e.js'); }).then(function (n) { return n.style; })).calculateStyles(this);
    this.hash = hash;
  }
  renderLink() {
    if (runStore.runState.router) {
      const defaultProps = runStore.href(this.href, runStore.runState.router);
      const overwrittenProps = Object.assign(Object.assign({}, defaultProps), { onClick: (ev) => {
          this.routeChange.emit({ type: "routechange", newUrl: this.href });
          if (typeof defaultProps.onClick === "function")
            defaultProps.onClick(ev);
          window.scrollTo({ top: 0 });
        } });
      return (index.h("a", Object.assign({}, overwrittenProps, { class: this.hash }), index.h("slot", null)));
    }
    return (index.h("a", { href: this.href, class: this.hash }, index.h("slot", null)));
  }
  render() {
    return index.h(index.Host, { class: this.hash }, this.renderLink());
  }
};

const CorejamBox = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    //@todo check if props are valid
    this.display = "block";
    this.droppableElements = ["corejam-box"];
  }
  componentShouldUpdate(newValue, oldValue) {
    return newValue != oldValue;
  }
  async componentWillLoad() {
    await this.computeStyles();
  }
  async computeStyles() {
    const hash = await (await Promise.resolve().then(function () { return require('./style-0fc3d97e.js'); }).then(function (n) { return n.style; })).calculateStyles(this);
    this.hash = hash;
  }
  render() {
    return (index.h(index.Host, { class: this.hash }, index.h("slot", null)));
  }
  static get watchers() { return {
    "flex": ["computeStyles"],
    "display": ["computeStyles"],
    "smDisplay": ["computeStyles"],
    "mdDisplay": ["computeStyles"],
    "lgDisplay": ["computeStyles"],
    "xlDisplay": ["computeStyles"],
    "direction": ["computeStyles"],
    "smDirection": ["computeStyles"],
    "mdDirection": ["computeStyles"],
    "lgDirection": ["computeStyles"],
    "xlDirection": ["computeStyles"],
    "items": ["computeStyles"],
    "smItems": ["computeStyles"],
    "mdItems": ["computeStyles"],
    "lgIitems": ["computeStyles"],
    "xlItems": ["computeStyles"],
    "alignContent": ["computeStyles"],
    "smAlignContent": ["computeStyles"],
    "mdAlignContent": ["computeStyles"],
    "lgAlignContent": ["computeStyles"],
    "xlAlignContent": ["computeStyles"],
    "self": ["computeStyles"],
    "smSelf": ["computeStyles"],
    "mdSelf": ["computeStyles"],
    "lgSelf": ["computeStyles"],
    "xlSelf": ["computeStyles"],
    "justify": ["computeStyles"],
    "smJustify": ["computeStyles"],
    "mdJustify": ["computeStyles"],
    "lgJustify": ["computeStyles"],
    "xljustify": ["computeStyles"],
    "wrap": ["computeStyles"],
    "smWrap": ["computeStyles"],
    "mdWrap": ["computeStyles"],
    "lgWrap": ["computeStyles"],
    "xlWrap": ["computeStyles"],
    "flow": ["computeStyles"],
    "smFlow": ["computeStyles"],
    "mdFlow": ["computeStyles"],
    "lgFlow": ["computeStyles"],
    "xlFlow": ["computeStyles"],
    "order": ["computeStyles"],
    "smOrder": ["computeStyles"],
    "mdOrder": ["computeStyles"],
    "lgOrder": ["computeStyles"],
    "xlOrder": ["computeStyles"],
    "grow": ["computeStyles"],
    "smGrow": ["computeStyles"],
    "mdGrow": ["computeStyles"],
    "lgGrow": ["computeStyles"],
    "xlGrow": ["computeStyles"],
    "shrink": ["computeStyles"],
    "smShrink": ["computeStyles"],
    "mdShrink": ["computeStyles"],
    "lgShrink": ["computeStyles"],
    "xlShrink": ["computeStyles"],
    "basis": ["computeStyles"],
    "smBasis": ["computeStyles"],
    "mdBasis": ["computeStyles"],
    "lgBasis": ["computeStyles"],
    "xlBasis": ["computeStyles"],
    "w": ["computeStyles"],
    "smW": ["computeStyles"],
    "mdW": ["computeStyles"],
    "lgW": ["computeStyles"],
    "xlW": ["computeStyles"],
    "h": ["computeStyles"],
    "smH": ["computeStyles"],
    "mdH": ["computeStyles"],
    "lgH": ["computeStyles"],
    "xlH": ["computeStyles"],
    "p": ["computeStyles"],
    "smP": ["computeStyles"],
    "mdP": ["computeStyles"],
    "lgP": ["computeStyles"],
    "xlP": ["computeStyles"],
    "py": ["computeStyles"],
    "smPy": ["computeStyles"],
    "mdPy": ["computeStyles"],
    "lgPy": ["computeStyles"],
    "xlPy": ["computeStyles"],
    "px": ["computeStyles"],
    "smPx": ["computeStyles"],
    "mdPx": ["computeStyles"],
    "lgPx": ["computeStyles"],
    "xlPx": ["computeStyles"],
    "pt": ["computeStyles"],
    "smPt": ["computeStyles"],
    "mdPt": ["computeStyles"],
    "lgPt": ["computeStyles"],
    "xlPt": ["computeStyles"],
    "pr": ["computeStyles"],
    "smPr": ["computeStyles"],
    "mdPr": ["computeStyles"],
    "lgPr": ["computeStyles"],
    "xlPr": ["computeStyles"],
    "pb": ["computeStyles"],
    "smPb": ["computeStyles"],
    "mdPb": ["computeStyles"],
    "lgPb": ["computeStyles"],
    "xlPb": ["computeStyles"],
    "pl": ["computeStyles"],
    "smPl": ["computeStyles"],
    "mdPl": ["computeStyles"],
    "lgPl": ["computeStyles"],
    "xlPl": ["computeStyles"],
    "m": ["computeStyles"],
    "smM": ["computeStyles"],
    "mdM": ["computeStyles"],
    "lgM": ["computeStyles"],
    "xlM": ["computeStyles"],
    "my": ["computeStyles"],
    "smMy": ["computeStyles"],
    "mdMy": ["computeStyles"],
    "lgMy": ["computeStyles"],
    "xlMy": ["computeStyles"],
    "mx": ["computeStyles"],
    "smMx": ["computeStyles"],
    "mdMx": ["computeStyles"],
    "lgMx": ["computeStyles"],
    "xlMx": ["computeStyles"],
    "mt": ["computeStyles"],
    "smMt": ["computeStyles"],
    "mdMt": ["computeStyles"],
    "lgMt": ["computeStyles"],
    "xlMt": ["computeStyles"],
    "mr": ["computeStyles"],
    "smMr": ["computeStyles"],
    "mdMr": ["computeStyles"],
    "lgMr": ["computeStyles"],
    "xlMr": ["computeStyles"],
    "mb": ["computeStyles"],
    "smMb": ["computeStyles"],
    "mdMb": ["computeStyles"],
    "lgMb": ["computeStyles"],
    "xlMb": ["computeStyles"],
    "ml": ["computeStyles"],
    "smMl": ["computeStyles"],
    "mdMl": ["computeStyles"],
    "lgMl": ["computeStyles"],
    "xlMl": ["computeStyles"],
    "max": ["computeStyles"],
    "smMax": ["computeStyles"],
    "mdMax": ["computeStyles"],
    "lgMax": ["computeStyles"],
    "xlMax": ["computeStyles"],
    "bg": ["computeStyles"],
    "smBg": ["computeStyles"],
    "mdBg": ["computeStyles"],
    "lgBg": ["computeStyles"],
    "xlBg": ["computeStyles"],
    "hoverBg": ["computeStyles"],
    "smHoverBg": ["computeStyles"],
    "mdHoverBg": ["computeStyles"],
    "lgHoverBg": ["computeStyles"],
    "xlHoverBg": ["computeStyles"],
    "hide": ["computeStyles"],
    "smHide": ["computeStyles"],
    "mdHide": ["computeStyles"],
    "lgHide": ["computeStyles"],
    "xlHide": ["computeStyles"],
    "show": ["computeStyles"],
    "smShow": ["computeStyles"],
    "mdShow": ["computeStyles"],
    "lgShow": ["computeStyles"],
    "xlShow": ["computeStyles"],
    "collapse": ["computeStyles"],
    "bColor": ["computeStyles"],
    "rounded": ["computeStyles"],
    "roundedTop": ["computeStyles"],
    "roundedRight": ["computeStyles"],
    "roundedLeft": ["computeStyles"],
    "roundedBottom": ["computeStyles"],
    "bStyle": ["computeStyles"],
    "bWidth": ["computeStyles"],
    "bWidthTop": ["computeStyles"],
    "bWidthRight": ["computeStyles"],
    "bWidthBottom": ["computeStyles"],
    "bWidthLeft": ["computeStyles"],
    "animation": ["computeStyles"],
    "shadow": ["computeStyles"],
    "hoverShadow": ["computeStyles"],
    "position": ["computeStyles"],
    "top": ["computeStyles"],
    "right": ["computeStyles"],
    "bottom": ["computeStyles"],
    "left": ["computeStyles"]
  }; }
};

exports.corejam_base_link = BaseLink;
exports.corejam_box = CorejamBox;
