// src/types/ymaps.d.ts
declare namespace ymaps {
  interface MapOptions {
    center: number[];
    zoom: number;
    controls?: string[];
  }

  class Map {
    constructor(container: HTMLElement, options: MapOptions);
    geoObjects: {
      add(obj: any): void;
    };
    controls: any;
  }

  interface PlacemarkOptions {
    iconColor?: string;
    draggable?: boolean;
  }

  interface PlacemarkProperties {
    balloonContent?: string;
  }

  class Placemark {
    constructor(
      coords: number[],
      properties?: PlacemarkProperties,
      options?: PlacemarkOptions
    );
  }

  function ready(callback: () => void): void; // ✅ shu qator qo‘shildi
}

interface Window {
  ymaps: typeof ymaps;
}
