text: define(["exports", "../../../lit-element/lit-element.js"], function (_exports, _litElement) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.CodePenButton = void 0;
  
    function _templateObject2_378d0a80d1d911ea92952ff2097cf814() {
      var data = babelHelpers.taggedTemplateLiteral(["\n        :host {\n          display: block;\n        }\n      "]);
  
      _templateObject2_378d0a80d1d911ea92952ff2097cf814 = function _templateObject2_378d0a80d1d911ea92952ff2097cf814() {
        return data;
      };
  
      return data;
    }
  
    function _templateObject_378d0a80d1d911ea92952ff2097cf814() {
      var data = babelHelpers.taggedTemplateLiteral(["\n      <form action=\"", "\" method=\"POST\" target=\"_blank\">\n        <input type=\"hidden\" name=\"data\" value=\"", "\" />\n        <input\n          type=\"image\"\n          src=\"https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/cp-arrow-right.svg\"\n          width=\"40\"\n          height=\"40\"\n          value=\"Open code pen in a new window\"\n          class=\"codepen-mover-button\"\n        />\n      </form>\n    "]);
  
      _templateObject_378d0a80d1d911ea92952ff2097cf814 = function _templateObject_378d0a80d1d911ea92952ff2097cf814() {
        return data;
      };
  
      return data;
    }
  
    /**
     * `code-pen-button`
     * `Post data to codepen to form a new pen`
     * @demo demo/index.html
     * @element code-pen-button
     */
    var CodePenButton =
    /*#__PURE__*/
    function (_LitElement) {
      babelHelpers.inherits(CodePenButton, _LitElement);
      babelHelpers.createClass(CodePenButton, [{
        key: "render",
        value: function render() {
          return (0, _litElement.html)(_templateObject_378d0a80d1d911ea92952ff2097cf814(), this.endPoint, this.dataString);
        }
      }, {
        key: "firstUpdated",
        value: function firstUpdated() {
          this.setAttribute("title", this.checkItOut);
        }
      }], [{
        key: "styles",
  
        /**
         * LitElement constructable styles enhancement
         */
        get: function get() {
          return [(0, _litElement.css)(_templateObject2_378d0a80d1d911ea92952ff2097cf814())];
        }
      }, {
        key: "tag",
        get: function get() {
          return "code-pen-button";
        }
      }]);
  
      function CodePenButton() {
        var _this;
  
        babelHelpers.classCallCheck(this, CodePenButton);
        _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(CodePenButton).call(this));
        _this.checkItOut = "Check it out on codepen";
        _this.endPoint = "https://codepen.io/pen/define";
        _this.data = {};
        return _this;
      }
  
      babelHelpers.createClass(CodePenButton, [{
        key: "updated",
        value: function updated(changedProperties) {
          var _this2 = this;
  
          changedProperties.forEach(function (oldValue, propName) {
            if (propName == "data" && _this2[propName]) {
              _this2.dataString = _this2._getDataString(_this2[propName]);
            }
          });
        }
      }, {
        key: "_getDataString",
  
        /**
         * Return string from data object so it can be posted correctly.
         */
        value: function _getDataString(data) {
          return JSON.stringify(data).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
        }
      }], [{
        key: "properties",
        get: function get() {
          return {
            checkItOut: {
              type: String,
              attribute: "check-it-out"
            },
  
            /**
             * End point for posting should it change in the future.
             */
            endPoint: {
              type: String,
              attribute: "end-point"
            },
  
            /**
             * Data object as a JSON string for the POST data in page.
             */
            dataString: {
              type: String,
              attribute: "data-string"
            },
  
            /**
             * Data object to post to code pen
             */
            data: {
              type: Object
            }
          };
        }
      }]);
      return CodePenButton;
    }(_litElement.LitElement);
  
    _exports.CodePenButton = CodePenButton;
    window.customElements.define(CodePenButton.tag, CodePenButton);
  });