function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

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

import React from 'react';
import IconSettings from "../../../../components/icon-settings";
import PageHeader from "../../../../components/page-header"; // `~` is replaced with design-system-react at runtime

import Button from "../../../../components/button";
import ButtonGroup from "../../../../components/button-group";
import Dropdown from "../../../../components/menu-dropdown";
import DropdownTrigger from "../../../../components/menu-dropdown/button-trigger";

var Example =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Example, _React$Component);

  function Example() {
    _classCallCheck(this, Example);

    return _possibleConstructorReturn(this, _getPrototypeOf(Example).apply(this, arguments));
  }

  _createClass(Example, [{
    key: "render",
    value: function render() {
      var controls = function controls() {
        return React.createElement("div", {
          className: "slds-button-group",
          role: "group"
        }, React.createElement("button", {
          type: "button",
          className: "slds-button slds-button_neutral"
        }, "Add Contact"), React.createElement("div", {
          className: "slds-button_last"
        }, React.createElement(Button, {
          iconCategory: "utility",
          iconName: "down",
          variant: "icon",
          iconVariant: "border-filled",
          assistiveText: {
            icon: 'More Actions'
          }
        })));
      };

      var actions = function actions() {
        return React.createElement("div", null, React.createElement(Dropdown, {
          align: "right",
          assistiveText: {
            icon: 'Change view'
          },
          iconCategory: "utility",
          iconName: "settings",
          iconVariant: "more",
          id: "content-right-dropdown",
          options: [{
            label: 'Menu Item One',
            value: 'A0'
          }, {
            label: 'Menu Item Two',
            value: 'B0'
          }, {
            label: 'Menu Item Three',
            value: 'C0'
          }, {
            type: 'divider'
          }, {
            label: 'Menu Item Four',
            value: 'D0'
          }]
        }, React.createElement(DropdownTrigger, null, React.createElement(Button, {
          assistiveText: {
            icon: 'Change view'
          },
          className: "slds-m-right_xx-small",
          iconCategory: "utility",
          iconName: "table",
          iconVariant: "more",
          variant: "icon"
        }))), React.createElement(ButtonGroup, null, React.createElement(Button, {
          iconCategory: "utility",
          iconName: "chart",
          variant: "icon",
          iconVariant: "border",
          className: "slds-m-left_xx-small",
          assistiveText: {
            icon: 'Chart'
          }
        }), React.createElement(Button, {
          iconCategory: "utility",
          iconName: "filterList",
          variant: "icon",
          iconVariant: "border",
          className: "slds-m-left_xx-small",
          assistiveText: {
            icon: 'Filter List'
          }
        }), React.createElement(Dropdown, {
          triggerClassname: true,
          align: "right",
          assistiveText: {
            icon: 'List View Controls'
          },
          iconCategory: "utility",
          iconName: "sort",
          iconVariant: "more",
          id: "content-right-dropdown-2",
          options: [{
            label: 'Menu Item One',
            value: 'A0'
          }, {
            label: 'Menu Item Two',
            value: 'B0'
          }, {
            label: 'Menu Item Three',
            value: 'C0'
          }, {
            type: 'divider'
          }, {
            label: 'Menu Item Four',
            value: 'D0'
          }]
        })));
      };

      var trail = [React.createElement("a", {
        href: "javascript:void(0);"
      }, "Accounts"), React.createElement("a", {
        href: "javascript:void(0);"
      }, "Company One")];
      return React.createElement(IconSettings, {
        iconPath: "/assets/icons"
      }, React.createElement(PageHeader, {
        title: "Contacts (will truncate)",
        onRenderControls: controls,
        onRenderActions: actions,
        variant: "object-home",
        truncate: true,
        trail: trail,
        info: "10 items \u2022 sorted by name"
      }));
    }
  }]);

  return Example;
}(React.Component);

_defineProperty(Example, "displayName", 'RelatedListPageHeaderExample');

export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
//# sourceMappingURL=related-list.js.map