import React from 'react';

interface DividerProps {
  label?: string;
  style?: 'line' | 'dashed' | 'dotted';
}

export function Divider({ label = '', style = 'line' }: DividerProps) {
  const borderStyle = {
    line: 'border-solid',
    dashed: 'border-dashed',
    dotted: 'border-dotted',
  };

  if (label) {
    return (
      <div className="w-full py-8">
        <div className="container max-w-4xl mx-auto px-4 flex items-center gap-4">
          <div className={`flex-1 border-t ${borderStyle[style]} border-soft-gray-border/30`} />
          <span className="text-sm font-medium text-text-light-gray px-4">{label}</span>
          <div className={`flex-1 border-t ${borderStyle[style]} border-soft-gray-border/30`} />
        </div>
      </div>
    );
  }

  return (
    <div className="w-full py-8">
      <div className="container max-w-4xl mx-auto px-4">
        <hr className={`${borderStyle[style]} border-soft-gray-border/30`} />
      </div>
    </div>
  );
}
