{"version":3,"file":"init.mjs","sources":["../../../../../packages/overlay/infowindow/use/init.ts"],"sourcesContent":["import { toPoint } from \"~/utils/converter\";\r\nimport type { Props } from \"./\";\r\n\r\nexport function useInit(props: Props, contentRef?: HTMLElement) {\r\n  const { minWidth, maxWidth, maxHeight, autoPan, closeButton, offset, autoPanPadding, closeOnClick, content } = props;\r\n  return new T.InfoWindow(contentRef || content, {\r\n    minWidth,\r\n    maxWidth,\r\n    maxHeight,\r\n    autoPan,\r\n    closeButton,\r\n    offset: toPoint(offset),\r\n    autoPanPadding: toPoint(autoPanPadding),\r\n    closeOnClick\r\n  });\r\n}\r\n"],"names":["useInit","props","contentRef","minWidth","maxWidth","maxHeight","autoPan","closeButton","offset","autoPanPadding","closeOnClick","content","toPoint"],"mappings":";AAGgB,SAAAA,EAAQC,GAAcC,GAA0B;AACxD,QAAA,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,SAAAC,GAAS,aAAAC,GAAa,QAAAC,GAAQ,gBAAAC,GAAgB,cAAAC,GAAc,SAAAC,EAAY,IAAAV;AAC/G,SAAO,IAAI,EAAE,WAAWC,KAAcS,GAAS;AAAA,IAC7C,UAAAR;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC;AAAA,IACA,QAAQK,EAAQJ,CAAM;AAAA,IACtB,gBAAgBI,EAAQH,CAAc;AAAA,IACtC,cAAAC;AAAA,EAAA,CACD;AACH;"}