import React from 'react';
import { View, ViewProps } from 'react-native';
import { useThemeColor } from '../../lib/hooks/use-theme-color';

interface SeparatorProps extends ViewProps {
  color?: string;
  thickness?: number;
  inset?: number;
}

export function Separator({
  color,
  thickness = 1,
  inset = 0,
  style,
  ...props
}: SeparatorProps) {
  const secondaryColor = useThemeColor('secondary');
  
  return (
    <View
      style={[
        {
          height: thickness,
          backgroundColor: color ?? secondaryColor,
          marginLeft: inset,
          marginRight: inset,
        },
        style,
      ]}
      {...props}
    />
  );
}