{"version":3,"file":"QueryEditorLazy.mjs","sources":["../../../src/components/QueryEditorLazy.tsx"],"sourcesContent":["import { css } from '@emotion/css';\nimport { lazy, Suspense } from 'react';\n\nimport { type GrafanaTheme2 } from '@grafana/data';\nimport { t } from '@grafana/i18n';\nimport { LoadingPlaceholder, useStyles2 } from '@grafana/ui';\n\nimport type { SqlQueryEditorProps } from './QueryEditor';\nconst QueryEditor = lazy(() => import(/* webpackChunkName: \"sql-query-editor\" */ './QueryEditor'));\n\nexport function SqlQueryEditorLazy(props: SqlQueryEditorProps) {\n  const styles = useStyles2(getStyles);\n\n  return (\n    <Suspense\n      fallback={\n        <LoadingPlaceholder\n          text={t('grafana-sql.components.sql-query-editor-lazy.text-loading-editor', 'Loading editor')}\n          className={styles.container}\n        />\n      }\n    >\n      <QueryEditor {...props} />\n    </Suspense>\n  );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n  return {\n    container: css({\n      marginBottom: 'unset',\n      marginLeft: theme.spacing(1),\n    }),\n  };\n};\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,WAAA,GAAc,KAAK,MAAM;AAAA;AAAA,EAAkD;AAAe,CAAC,CAAA;AAE1F,SAAS,mBAAmB,KAAA,EAA4B;AAC7D,EAAA,MAAM,MAAA,GAAS,WAAW,SAAS,CAAA;AAEnC,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,QAAA,kBACE,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,CAAA,CAAE,kEAAA,EAAoE,gBAAgB,CAAA;AAAA,UAC5F,WAAW,MAAA,CAAO;AAAA;AAAA,OACpB;AAAA,MAGF,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAa,GAAG,KAAA,EAAO;AAAA;AAAA,GAC1B;AAEJ;AAEA,MAAM,SAAA,GAAY,CAAC,KAAA,KAAyB;AAC1C,EAAA,OAAO;AAAA,IACL,WAAW,GAAA,CAAI;AAAA,MACb,YAAA,EAAc,OAAA;AAAA,MACd,UAAA,EAAY,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,KAC5B;AAAA,GACH;AACF,CAAA;;;;"}