{"version":3,"file":"EmbeddedDashboard.mjs","sources":["../../../src/components/EmbeddedDashboard.tsx"],"sourcesContent":["import type * as React from 'react';\n\nimport type { TimeRange } from '@grafana/data';\n\nexport interface EmbeddedDashboardProps {\n  uid?: string;\n  /**\n   * Use this property to override initial time and variable state.\n   * Example: ?from=now-5m&to=now&var-varname=value1\n   */\n  initialState?: string;\n  /**\n   * Is called when ever the internal embedded dashboards url state changes.\n   * Can be used to sync the internal url state (Which is not synced to URL) with the external context, or to\n   * preserve some of the state when moving to other embedded dashboards.\n   */\n  onStateChange?: (state: string) => void;\n  /**\n   * When set, drives the embedded dashboard's time range. Updating this prop syncs the\n   * new range into the embedded dashboard without remounting it.\n   * Takes precedence over any `from`/`to` provided through `initialState`.\n   * Static state such as variable values or hiding the time picker can instead be passed\n   * via `initialState` (e.g. `var-name=value`, `_dash.hideTimePicker=true`).\n   */\n  timeRange?: TimeRange;\n  /**\n   * Change this value (for example by incrementing a counter) to trigger a data refresh.\n   * Re-runs all queries and re-evaluates relative time ranges, mirroring the dashboard's\n   * own refresh button.\n   */\n  refreshToken?: string | number;\n}\n\n/**\n * Returns a React component that renders an embedded dashboard.\n * @alpha\n */\nexport let EmbeddedDashboard: React.ComponentType<EmbeddedDashboardProps> = () => {\n  throw new Error('EmbeddedDashboard requires runtime initialization');\n};\n\n/**\n *\n * @internal\n */\nexport function setEmbeddedDashboard(component: React.ComponentType<EmbeddedDashboardProps>) {\n  EmbeddedDashboard = component;\n}\n"],"names":[],"mappings":";AAqCO,IAAI,oBAAiE,MAAM;AAChF,EAAA,MAAM,IAAI,MAAM,mDAAmD,CAAA;AACrE;AAMO,SAAS,qBAAqB,SAAA,EAAwD;AAC3F,EAAA,iBAAA,GAAoB,SAAA;AACtB;;;;"}