"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireDefault(require("react"));
var _Sections = require("@wix/wix-storybook-utils/Sections");
var _react2 = _interopRequireDefault(require("@storybook/addon-links/react"));
var _storySettings = require("./storySettings");
var _SectionHelper = _interopRequireDefault(require("../../SectionHelper"));
var _ = _interopRequireDefault(require(".."));
var _storiesHierarchy = require("../../../stories/storiesHierarchy");
var _clients = _interopRequireDefault(require("../../clients"));
var _GoogleAPILoader = _interopRequireDefault(require("../../../stories/utils/GoogleAPILoader"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/GoogleAddressInput/docs/index.story.jsx",
  _this = void 0;
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var example = function example(config) {
  return (0, _Sections.example)(_objectSpread({
    components: {
      GoogleAPILoader: _GoogleAPILoader["default"]
    }
  }, config));
};
var basicExample = "\n() => {\n  const [value, setValue] = React.useState();\n  return (\n    <GoogleAPILoader>\n      <GoogleAddressInput\n        value={value}\n        onChange={e => setValue(e.target.value)}\n        onSet={e => setValue(e.originValue)}\n        Client={clients.GoogleMapsClient}\n     />\n    </GoogleAPILoader>\n    );\n}\n";
var _default = exports["default"] = {
  category: _storiesHierarchy.CATEGORY.DEPRECATED,
  storyName: 'GoogleAddressInput',
  component: _["default"],
  componentPath: '..',
  componentWrapper: function componentWrapper(_ref) {
    var component = _ref.component;
    return /*#__PURE__*/_react["default"].createElement(_GoogleAPILoader["default"], {
      __self: _this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 52,
        columnNumber: 5
      }
    }, component);
  },
  componentProps: function componentProps(setProps) {
    return {
      Client: _clients["default"].GoogleMapsClient,
      value: '',
      onChange: function onChange(e) {
        return setProps({
          value: e.target.value
        });
      },
      onSet: function onSet(e) {
        return setProps({
          value: e.originValue
        });
      },
      placeholder: 'Enter Address...'
    };
  },
  sections: [(0, _Sections.header)(), (0, _Sections.tabs)([(0, _Sections.tab)({
    title: 'Description',
    sections: [(0, _Sections.description)({
      text: /*#__PURE__*/_react["default"].createElement(_SectionHelper["default"], {
        title: "Deprecated",
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 71,
          columnNumber: 15
        }
      }, "Wix projects should now use the new ", /*#__PURE__*/_react["default"].createElement(_react2["default"], {
        kind: _storiesHierarchy.Category.COMPONENTS,
        story: "AtlasAddressInput",
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 73,
          columnNumber: 17
        }
      }, "<AtlasAddressInput/>"), " component.\n", "Check the migration tab for more details.")
    }), (0, _Sections.importExample)("\nimport { GoogleAddressInput, clients } from '@wix/design-system';\nconst client = clients.GoogleMapsClient;\n            "), (0, _Sections.divider)(), (0, _Sections.title)('Examples'), example({
      title: 'Basic usage',
      source: basicExample
    })]
  })].concat((0, _toConsumableArray2["default"])([{
    title: 'API',
    sections: [(0, _Sections.api)()]
  }, {
    title: 'Testkit',
    sections: [(0, _Sections.testkit)()]
  }, {
    title: 'Playground',
    sections: [(0, _Sections.playground)()]
  }].map(_Sections.tab))))]
};