"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBGH43QACjs = require('./chunk-BGH43QAC.js');var _chunkPIODW45Fjs = require('./chunk-PIODW45F.js');var _chunk3SMO7LWDjs = require('./chunk-3SMO7LWD.js');var _chunkP6TSSCDPjs = require('./chunk-P6TSSCDP.js');var _react = require('react');var _inputs = require('@baseapp-frontend/design-system/components/web/inputs');var _material = require('@mui/material');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');function c(e){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(e)}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(o){V(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function V(e,t,r){return(t=$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(e){var t=B(e,"string");return c(t)=="symbol"?t:t+""}function B(e,t){if(c(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(c(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _(e,t){return z(e)||U(e,t)||M(e,t)||H()}function H(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(e,t){if(e){if(typeof e=="string")return w(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function U(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,f,u,a=[],s=!0,p=!1;try{if(f=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(o=f.call(r)).done)&&(a.push(o.value),a.length!==t);s=!0);}catch(y){p=!0,i=y}finally{try{if(!s&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(p)throw i}}return a}}function z(e){if(Array.isArray(e))return e}var te=function(t){var r=t.queryRef,o=t.LogGroups,i=o===void 0?_chunkPIODW45Fjs.a:o,f=t.LogGroupsProps,u=_react.useState.call(void 0, ["All"]),a=_(u,2),s=a[0],p=a[1],y=_react.useTransition.call(void 0, ),b=_(y,2),d=b[0],g=b[1],m=_reacthookform.useForm.call(void 0, {defaultValues:{search:""}}),A=m.control,C=m.reset,N=m.watch,T=N("search"),l=_chunk3SMO7LWDjs.b.call(void 0, r),v=l.logGroups,G=l.loadNext,F=l.hasNext,I=l.isLoadingNext,S=l.refetch,D=function(){g(function(){C(),S({userName:""})})},E=function(W){var q=W.target.value||"";g(function(){S({userName:q,count:10,cursor:null},{fetchPolicy:"store-and-network"})})},R=v.length===0;return _jsxruntime.jsx.call(void 0, _material.Box,{p:2,justifyContent:"center",minWidth:"100%",display:"flex",alignItems:"center",children:_jsxruntime.jsxs.call(void 0, _material.Box,{justifyContent:"center",maxWidth:600,width:"100%",mx:"auto",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h4",variant:"h4",mb:4,children:"Activity Log"}),_jsxruntime.jsx.call(void 0, _inputs.Searchbar,{placeholder:"Search by user",name:"search",control:A,onChange:E,onClear:D,isPending:d}),_jsxruntime.jsx.call(void 0, _material.Box,{display:"flex",mt:2,mb:2,children:_jsxruntime.jsx.call(void 0, _chunkBGH43QACjs.a,{options:["All","Comments","Reactions","Posts"],selectedOptions:s,onChange:p})}),!d&&T&&R&&_jsxruntime.jsx.call(void 0, _chunkP6TSSCDPjs.a,{}),_jsxruntime.jsx.call(void 0, i,K({logGroups:v,loadNext:G,hasNext:F,isLoadingNext:I},f))]})})},fe= exports.a =te;exports.a = fe;
//# sourceMappingURL=chunk-5NWTCBMF.js.map