text: "use strict";
  /**
   * Foundation adapters.
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  /**
   * Container adapter interface
   * Default implementations are noop and returns meaningless value.
   */
  var ContainerAdapter = (function () {
      function ContainerAdapter() {
      }
      ContainerAdapter.prototype.addClass = function (_className) {
      };
      ContainerAdapter.prototype.removeClass = function (_className) {
      };
      ContainerAdapter.prototype.isChecked = function () {
          return null;
      };
      return ContainerAdapter;
  }());
  exports.ContainerAdapter = ContainerAdapter;
  /**
   * Native control adapter interface
   * Default implementations are noop and returns meaningless value.
   */
  var NativeControlAdapter = (function () {
      function NativeControlAdapter() {
      }
      NativeControlAdapter.prototype.getNativeControl = function () {
          return null;
      };
      NativeControlAdapter.prototype.setDefaultOnChangeHandler = function (_onChange) {
      };
      return NativeControlAdapter;
  }());
  exports.NativeControlAdapter = NativeControlAdapter;
  /**
   * Composite adapter for MDCRadioFoundation
   */
  var FoundationAdapter = (function () {
      function FoundationAdapter() {
          this.containerAdapter = new ContainerAdapter();
          this.nativeControlAdapter = new NativeControlAdapter();
          this.defaultOnchangeHandler = function () { };
      }
      FoundationAdapter.prototype.setContainerAdapter = function (containerAdapter) {
          this.containerAdapter = containerAdapter;
      };
      FoundationAdapter.prototype.setNativeControlAdapter = function (nativeControlAdapter) {
          this.nativeControlAdapter = nativeControlAdapter;
          this.nativeControlAdapter.setDefaultOnChangeHandler(this.defaultOnchangeHandler);
      };
      FoundationAdapter.prototype.addClass = function (className) {
          this.containerAdapter.addClass(className);
      };
      FoundationAdapter.prototype.removeClass = function (className) {
          this.containerAdapter.removeClass(className);
      };
      FoundationAdapter.prototype.getNativeControl = function () {
          return this.nativeControlAdapter.getNativeControl();
      };
      FoundationAdapter.prototype.setDefaultOnChangeHandler = function (onChange) {
          this.nativeControlAdapter.setDefaultOnChangeHandler(onChange);
      };
      FoundationAdapter.prototype.isChecked = function () {
          return this.containerAdapter.isChecked();
      };
      /**
       * MDCFoundation accepts only object as adapter
       * So we create object-proxy of instance.
       */
      FoundationAdapter.prototype.toObject = function () {
          var _this = this;
          var keys = Object.getOwnPropertyNames(Object.getPrototypeOf(this));
          var object = {};
          keys.forEach(function (key) {
              object[key] = function () {
                  var args = [];
                  for (var _i = 0; _i < arguments.length; _i++) {
                      args[_i] = arguments[_i];
                  }
                  return _this[key].apply(_this, args);
              };
          });
          return object;
      };
      return FoundationAdapter;
  }());
  exports.FoundationAdapter = FoundationAdapter;
  //# sourceMappingURL=adapter.js.map