var _examples$AVATAR_EXAM;

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; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { styled } from '../styles/index.js';
import { Avatar } from './index.js';
import examples from './examples-list.js';
var Row = styled('div', function (props) {
  return {
    width: '400px',
    display: 'flex',
    justifyContent: 'space-around',
    alignItems: 'flex-end',
    marginTop: props.$theme.sizing.scale1400
  };
});
Row.displayName = "Row";
export default (_examples$AVATAR_EXAM = {}, _defineProperty(_examples$AVATAR_EXAM, examples.AVATAR_EXAMPLE, function AvatarStory() {
  return React.createElement(Row, null, ['scale800', 'scale1000', 'scale1200', 'scale1400', '64px'].map(function (size, index) {
    return React.createElement(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, examples.AVATAR_ERROR, function AvatarErrorStory() {
  return React.createElement(Row, null, ['scale800', 'scale1000', 'scale1200', 'scale1400', '64px'].map(function (size, index) {
    return React.createElement(Avatar, {
      name: "username",
      size: size,
      src: "https://not-a-real-image.png",
      key: size
    });
  }));
}), _defineProperty(_examples$AVATAR_EXAM, examples.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(Avatar, {
    overrides: borderOverrides,
    name: "Beyonce Knowles #1",
    size: "scale1400",
    src: "https://api.adorable.io/avatars/285/11@adorable.io.png"
  }), React.createElement(Avatar, {
    overrides: borderOverrides,
    name: "Beyonce Knowles #2",
    size: "scale1400",
    src: "https://not-a-real-image.png"
  })), React.createElement(Row, null, React.createElement(Avatar, {
    overrides: squaredOverrides,
    name: "Beyonce Knowles #3",
    size: "scale1400",
    src: "https://api.adorable.io/avatars/285/12@adorable.io.png"
  }), React.createElement(Avatar, {
    overrides: squaredOverrides,
    name: "Beyonce Knowles #4",
    size: "scale1400",
    src: "https://not-a-real-image.png"
  })));
}), _examples$AVATAR_EXAM);