import React from 'react';
import { Icon } from '$components/panels/Icon';
type Props = {
routerCancel: Function,
routerSubmit: Function,
routerPoints: Number,
width: Number,
}
const noPoints = ({ routerCancel }: Props) => (
Укажите первую точку на карте
);
const firstPoint = ({ routerCancel }: Props) => (
);
const draggablePoints = ({ routerCancel, routerSubmit }: Props) => (
);
export const RouterDialog = ({ routerPoints, routerCancel, routerSubmit, width }: Props) => (
{!routerPoints && noPoints({ routerCancel })}
{routerPoints === 1 && firstPoint({ routerCancel })}
{routerPoints >= 2 && draggablePoints({ routerCancel, routerSubmit })}
);