import { Text, View, StyleSheet } from '@react-pdf/renderer';
import type { Style } from '@react-pdf/types';

type PdfParamBadgeProps = {
  children: React.ReactNode;
  style?: Style;
};

const styles = StyleSheet.create({
  parameterBadge: {
    backgroundColor: '#F5F5F5',
    color: '#333333',
    padding: 4,
    borderRadius: 4,
    fontSize: 8,
    marginRight: 8,
    marginBottom: 4,
  },
});

export const PdfParamBadge = ({ children, style }: PdfParamBadgeProps) => {
  return (
    <View style={[styles.parameterBadge, ...(style ? [style] : [])]}>
      <Text>{children}</Text>
    </View>
  );
};
