"use strict";(self.webpackChunk_grafana_ui=self.webpackChunk_grafana_ui||[]).push([[3982],{"./src/components/DateTimePickers/TimeRangePicker.story.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:function(){return Basic}});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/jsx-runtime.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/@storybook/addon-actions/dist/index.mjs"),_storybook_preview_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("storybook/internal/preview-api"),_grafana_data__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../grafana-data/src/datetime/moment_wrapper.ts"),_grafana_data__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../grafana-data/src/types/time.ts"),_TimeRangePicker__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/DateTimePickers/TimeRangePicker.tsx");const to=(0,_grafana_data__WEBPACK_IMPORTED_MODULE_3__.KQ)(),from=to.subtract(6,"h"),meta={title:"Pickers and Editors/TimePickers/TimeRangePicker",component:_TimeRangePicker__WEBPACK_IMPORTED_MODULE_4__.$6,args:{value:{from:from,to:to,raw:{from:"now-6h",to:"now"}},timeZone:_grafana_data__WEBPACK_IMPORTED_MODULE_5__.lE,history:[]},parameters:{controls:{exclude:["onChange","onChangeTimeZone","onChangeFiscalYearStartMonth","onMoveBackward","onMoveForward","onZoom","timeSyncButton"]}}},Basic=args=>{const[,updateArgs]=(0,_storybook_preview_api__WEBPACK_IMPORTED_MODULE_2__.useArgs)();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_TimeRangePicker__WEBPACK_IMPORTED_MODULE_4__.$6,{...args,onChange:value=>{(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.XI)("onChange")(value),updateArgs({value:value,history:args.history?[...args.history,value]:[value]})},onChangeTimeZone:timeZone=>{(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.XI)("onChangeTimeZone")(timeZone),updateArgs({timeZone:timeZone})},onMoveBackward:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.XI)("onMoveBackward"),onMoveForward:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.XI)("onMoveForward"),onZoom:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__.XI)("onZoom")})};__webpack_exports__.default=meta,Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:"args => {\n  const [, updateArgs] = useArgs();\n  return <TimeRangePicker {...args} onChange={value => {\n    action('onChange')(value);\n    updateArgs({\n      value,\n      history: args.history ? [...args.history, value] : [value]\n    });\n  }} onChangeTimeZone={timeZone => {\n    action('onChangeTimeZone')(timeZone);\n    updateArgs({\n      timeZone\n    });\n  }} onMoveBackward={action('onMoveBackward')} onMoveForward={action('onMoveForward')} onZoom={action('onZoom')} />;\n}",...Basic.parameters?.docs?.source}}}}}]);