import * as L from 'leaflet';

declare module 'leaflet' {
  function polylineDecorator(
    paths: L.Polyline | L.Polygon | L.LatLngExpression[] | L.LatLngExpression[][],
    options?: {
      patterns: Array<{
        offset?: string | number;
        endOffset?: string | number;
        repeat?: string | number;
        symbol: L.Symbol.ArrowHead | L.Symbol.Marker | L.Symbol.Dash;
      }>;
    }
  ): L.FeatureGroup;

  namespace Symbol {
    function arrowHead(options?: {
      pixelSize?: number;
      polygon?: boolean;
      pathOptions?: L.PathOptions;
      headAngle?: number;
    }): ArrowHead;

    function marker(options?: {
      rotate?: boolean;
      markerOptions?: L.MarkerOptions;
    }): Marker;

    function dash(options?: {
      pixelSize?: number;
      pathOptions?: L.PathOptions;
    }): Dash;

    interface ArrowHead {}
    interface Marker {}
    interface Dash {}
  }
}
