{"version":3,"file":"init.mjs","sources":["../../../../../packages/tilelayer/tdt/use/init.ts"],"sourcesContent":["import { toBounds } from \"~/utils/converter\";\r\nimport type { Props } from \"./\";\r\n\r\nexport function useInit(props: Props, attrs: Record<string, unknown>) {\r\n  const { url, minZoom, maxZoom, errorTileUrl, opacity, zIndex, bounds } = props;\r\n  return new T.TileLayer.TDT(url, {\r\n    minZoom,\r\n    maxZoom,\r\n    errorTileUrl,\r\n    opacity,\r\n    zIndex,\r\n    bounds: bounds.length ? toBounds(bounds) : undefined,\r\n    ...attrs\r\n  });\r\n}\r\n"],"names":["useInit","props","attrs","url","minZoom","maxZoom","errorTileUrl","opacity","zIndex","bounds","toBounds"],"mappings":";AAGgB,SAAAA,EAAQC,GAAcC,GAAgC;AAC9D,QAAA,EAAE,KAAAC,GAAK,SAAAC,GAAS,SAAAC,GAAS,cAAAC,GAAc,SAAAC,GAAS,QAAAC,GAAQ,QAAAC,MAAWR;AACzE,SAAO,IAAI,EAAE,UAAU,IAAIE,GAAK;AAAA,IAC9B,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAQC,EAAO,SAASC,EAASD,CAAM,IAAI;AAAA,IAC3C,GAAGP;AAAA,EAAA,CACJ;AACH;"}