import { PORT_RADIUS } from '../../../constants/sizes.ts'; export const portGroups = { left: { position: 'left', attrs: { circle: { r: PORT_RADIUS, magnet: true, stroke: '#8c8c8c', strokeWidth: 1, fill: '#fff', }, }, label: { position: { name: 'left', args: { x: -8, y: 0 }, }, }, }, right: { position: 'right', attrs: { circle: { r: PORT_RADIUS, magnet: true, stroke: '#8c8c8c', strokeWidth: 1, fill: '#fff', }, }, label: { position: { name: 'right', args: { x: 8, y: 0 }, }, }, }, }; export function createPortItem( portId: string, side: 'left' | 'right', label: string, labelColor?: string, ) { return { id: portId, group: side, attrs: { text: { text: label, fontSize: 8, fill: labelColor || '#595959', }, circle: { fill: labelColor || '#fff', stroke: labelColor || '#8c8c8c', }, }, }; }