function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import * as React from 'react';
import HeaderAction from './HeaderAction';
import BackIcon from './BackIcon';
/**
 * A component used to display a back button in the appbar.
 *
 * <div class="screenshots">
 *   <img class="small" src="screenshots/appbar-backaction-android.png" />
 * </div>
 *
 * ## Usage
 * ```js
 * import * as React from 'react';
 * import { Appbar } from 'react-native-paper';
 *
 *
 * const MyComponent = () => (
 *     <Appbar.Header>
 *       <Appbar.BackAction onPress={() => {}} />
 *     </Appbar.Header>
 * );
 *
 * export default MyComponent;
 * ```
 */
const HeaderBackAction = _ref => {
  let {
    accessibilityLabel = 'Back',
    ...rest
  } = _ref;
  return /*#__PURE__*/React.createElement(HeaderAction, _extends({
    accessibilityLabel: accessibilityLabel
  }, rest, {
    icon: BackIcon,
    isLeading: true
  }));
};
HeaderBackAction.displayName = 'Header.BackAction';
export default HeaderBackAction;

// @component-docs ignore-next-line
export { HeaderBackAction };
//# sourceMappingURL=HeaderBackAction.js.map