"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var React = _interopRequireWildcard(require("react"));

var _styles = require("../styles");

var _index = require("./index");

var _examplesList = _interopRequireDefault(require("./examples-list"));

var _examples$AVATAR_EXAM;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var Row = (0, _styles.styled)('div', function (props) {
  return {
    width: '400px',
    display: 'flex',
    justifyContent: 'space-around',
    alignItems: 'flex-end',
    marginTop: props.$theme.sizing.scale1400
  };
});

var _default = (_examples$AVATAR_EXAM = {}, _defineProperty(_examples$AVATAR_EXAM, _examplesList.default.AVATAR_EXAMPLE, function AvatarStory() {
  return React.createElement(Row, null, ['scale800', 'scale1000', 'scale1200', 'scale1400', '64px'].map(function (size, index) {
    return React.createElement(_index.Avatar, {
      name: "user name # ".concat(index),
      size: size,
      src: "https://api.adorable.io/avatars/285/".concat(index, "@adorable.io.png"),
      key: size
    });
  }));
}), _defineProperty(_examples$AVATAR_EXAM, _examplesList.default.AVATAR_ERROR, function AvatarErrorStory() {
  return React.createElement(Row, null, ['scale800', 'scale1000', 'scale1200', 'scale1400', '64px'].map(function (size, index) {
    return React.createElement(_index.Avatar, {
      name: "user name # ".concat(index),
      size: size,
      src: "https://not-a-real-image.png",
      key: size
    });
  }));
}), _defineProperty(_examples$AVATAR_EXAM, _examplesList.default.AVATAR_OVERRIDE, function AvatarOverrideStory() {
  var borderOverrides = {
    Root: {
      style: function style(_ref) {
        var $theme = _ref.$theme;
        return _objectSpread({}, $theme.borders.border500);
      }
    }
  };
  var squaredOverrides = {
    Avatar: {
      style: function style(_ref2) {
        var $theme = _ref2.$theme;
        return {
          borderRadius: $theme.borders.radius100
        };
      }
    },
    Root: {
      style: function style(_ref3) {
        var $theme = _ref3.$theme;
        return _objectSpread({
          borderRadius: $theme.borders.radius100
        }, $theme.borders.border500);
      }
    }
  };
  return React.createElement(React.Fragment, null, React.createElement(Row, null, React.createElement(_index.Avatar, {
    overrides: borderOverrides,
    name: "user name #1",
    size: "scale1400",
    src: "https://api.adorable.io/avatars/285/11@adorable.io.png"
  }), React.createElement(_index.Avatar, {
    overrides: borderOverrides,
    name: "user name #2",
    size: "scale1400",
    src: "https://not-a-real-image.png"
  })), React.createElement(Row, null, React.createElement(_index.Avatar, {
    overrides: squaredOverrides,
    name: "user name #3",
    size: "scale1400",
    src: "https://api.adorable.io/avatars/285/12@adorable.io.png"
  }), React.createElement(_index.Avatar, {
    overrides: squaredOverrides,
    name: "user name #4",
    size: "scale1400",
    src: "https://not-a-real-image.png"
  })));
}), _examples$AVATAR_EXAM);

exports.default = _default;