"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _pearl = require("../../../pearl");
var _reactNative = require("react-native");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
/**
 * BaseDividerProps is a type that extends BoxProps and adds properties specific to the Divider component.
 * It includes properties for length, thickness, and orientation of the divider.
 */

/**
 * CustomDivider is a functional component that returns a Box component with specific styles based on the props.
 * It uses the forwardRef function from React to pass the ref to the Box component.
 */
const CustomDivider = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(({
  children,
  length = "100%",
  thickness = 1,
  orientation = "horizontal",
  ...props
}, ref) => {
  // Styles are applied based on the orientation of the divider
  const style = _react.default.useMemo(() => ({
    height: orientation === "horizontal" ? thickness : length,
    width: orientation === "vertical" ? thickness : length,
    ...props.style
  }), [props.style, orientation, thickness, length]);
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
    ref: ref
  }, props, {
    style: style
  }), children);
}));

/**
 * Divider is a component used to visually separate content in a list or group.
 */
const Divider = (0, _pearl.pearl)(CustomDivider, {
  componentName: "Divider",
  type: "atom",
  animatable: true
});

/** DividerProps is a type that represents the props of the Divider component */

Divider.displayName = "Divider";
var _default = exports.default = Divider;
//# sourceMappingURL=divider.js.map