{"version":3,"file":"get-legend-position.cjs","names":[],"sources":["../../../src/utils/get-legend-position/get-legend-position.ts"],"sourcesContent":["import type { LegendProps } from 'recharts';\n\nexport function getLegendPosition(\n  legendProps: Omit<LegendProps, 'ref'> | undefined,\n  defaultPosition: 'top' | 'bottom'\n): 'top' | 'bottom' | 'middle' {\n  if (legendProps?.position === 'top' || legendProps?.position === 'bottom') {\n    return legendProps.position;\n  }\n\n  if (legendProps?.position != null) {\n    return 'middle';\n  }\n\n  return legendProps?.verticalAlign || defaultPosition;\n}\n"],"mappings":";;AAEA,SAAgB,kBACd,aACA,iBAC6B;CAC7B,IAAI,aAAa,aAAa,SAAS,aAAa,aAAa,UAC/D,OAAO,YAAY;CAGrB,IAAI,aAAa,YAAY,MAC3B,OAAO;CAGT,OAAO,aAAa,iBAAiB;AACvC"}