import React, { memo } from 'react';
import { View, StyleSheet } from 'react-native';
import PrevButton from './prev-button';
import NextButton from './next-button';
import Selectors from './selectors';
import { isEqual } from 'lodash';
const defaultStyles = StyleSheet.create({
  headerContainer: {
    paddingVertical: 3
  },
  container: {
    padding: 5,
    gap: 10,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between'
  },
  navigation: {
    flexDirection: 'row'
  }
});
const NavigationButtons = ({
  styles,
  classNames
}) => /*#__PURE__*/React.createElement(View, {
  style: defaultStyles.navigation
}, /*#__PURE__*/React.createElement(PrevButton, {
  style: styles === null || styles === void 0 ? void 0 : styles.button_prev,
  imageStyle: styles === null || styles === void 0 ? void 0 : styles.button_prev_image,
  className: classNames === null || classNames === void 0 ? void 0 : classNames.button_prev,
  imageClassName: classNames === null || classNames === void 0 ? void 0 : classNames.button_prev_image
}), /*#__PURE__*/React.createElement(NextButton, {
  style: styles === null || styles === void 0 ? void 0 : styles.button_next,
  imageStyle: styles === null || styles === void 0 ? void 0 : styles.button_next_image,
  className: classNames === null || classNames === void 0 ? void 0 : classNames.button_next,
  imageClassName: classNames === null || classNames === void 0 ? void 0 : classNames.button_next_image
}));
const Header = ({
  navigationPosition = 'around',
  styles = {},
  classNames = {}
}) => {
  return /*#__PURE__*/React.createElement(View, {
    style: [defaultStyles.headerContainer, styles === null || styles === void 0 ? void 0 : styles.header],
    className: classNames === null || classNames === void 0 ? void 0 : classNames.header
  }, /*#__PURE__*/React.createElement(View, {
    style: defaultStyles.container
  }, navigationPosition === 'left' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavigationButtons, {
    styles: styles,
    classNames: classNames
  }), /*#__PURE__*/React.createElement(Selectors, {
    position: "left"
  })) : navigationPosition === 'right' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Selectors, {
    position: "right"
  }), /*#__PURE__*/React.createElement(NavigationButtons, {
    styles: styles,
    classNames: classNames
  })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PrevButton, {
    style: styles === null || styles === void 0 ? void 0 : styles.button_prev,
    imageStyle: styles === null || styles === void 0 ? void 0 : styles.button_prev_image,
    className: classNames === null || classNames === void 0 ? void 0 : classNames.button_prev,
    imageClassName: classNames === null || classNames === void 0 ? void 0 : classNames.button_prev_image
  }), /*#__PURE__*/React.createElement(Selectors, {
    position: "around"
  }), /*#__PURE__*/React.createElement(NextButton, {
    style: styles === null || styles === void 0 ? void 0 : styles.button_next,
    imageStyle: styles === null || styles === void 0 ? void 0 : styles.button_next_image,
    className: classNames === null || classNames === void 0 ? void 0 : classNames.button_next,
    imageClassName: classNames === null || classNames === void 0 ? void 0 : classNames.button_next_image
  }))));
};
const customComparator = (prev, next) => {
  const areEqual = prev.PrevIcon === next.PrevIcon && prev.NextIcon === next.NextIcon && prev.navigationPosition === next.navigationPosition && isEqual(prev.styles, next.styles) && isEqual(prev.classNames, next.classNames);
  return areEqual;
};
export default /*#__PURE__*/memo(Header, customComparator);
//# sourceMappingURL=index.js.map