"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8808],{71585:(e,t,a)=>{a.d(t,{p:()=>N});var r=a(36636),n=a(68404),s=a(90923),o=a(69783),i=a(80672),l=a(87092),d=a(43215),c=a(34751),u=a(74669),h=a(23078),p=a(53772);const m={loadingState:d.LoadingState.Loading,dashboardTitles:[]},g=(0,p.PH)("libraryPanels/delete/searchCompleted"),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;return g.match(t)?Object.assign({},e,{dashboardTitles:t.payload.dashboards.map((e=>e.title)),loadingState:d.LoadingState.Done}):e};var x,f,j,y,v=a(45916);const S=e=>{let{libraryPanel:t,onDismiss:a,onConfirm:r}=e;const s=(0,o.useStyles)(c.J),[{dashboardTitles:i,loadingState:l},p]=(0,n.useReducer)(b,m),j=(0,n.useMemo)((()=>(0,u.tb)(p)),[p]);(0,n.useEffect)((()=>{j(function(e){return async function(t){const a=await(0,h.E8)(e.uid);t(g({dashboards:a}))}}(t))}),[j,t]);const y=Boolean(i.length),S=l===d.LoadingState.Done;return(0,v.jsxs)(o.Modal,{className:s.modal,title:"Delete library panel",icon:"trash-alt",onDismiss:a,isOpen:!0,children:[S?null:x||(x=(0,v.jsx)(D,{})),S?(0,v.jsxs)("div",{children:[y?(0,v.jsx)(P,{dashboardTitles:i}):null,y?null:f||(f=(0,v.jsx)(w,{})),(0,v.jsxs)(o.Modal.ButtonRow,{children:[(0,v.jsx)(o.Button,{variant:"secondary",onClick:a,fill:"outline",children:"Cancel"}),(0,v.jsx)(o.Button,{variant:"destructive",onClick:r,disabled:y,children:"Delete"})]})]}):null]})},D=()=>j||(j=(0,v.jsx)("span",{children:"Loading library panel..."})),w=()=>{const e=(0,o.useStyles)(c.J);return(0,v.jsx)("div",{className:e.modalText,children:"Do you want to delete this panel?"})},P=e=>{let{dashboardTitles:t}=e;const a=(0,o.useStyles)(c.J),r=1===t.length?"dashboard.":"dashboards.",n=`${t.length} ${r}`;return 0===t.length?null:(0,v.jsxs)("div",{children:[(0,v.jsxs)("p",{className:a.textInfo,children:["This library panel can not be deleted because it is connected to ",(0,v.jsx)("strong",{children:n})," Remove the library panel from the dashboards listed below and retry."]}),(0,v.jsxs)("table",{className:a.myTable,children:[y||(y=(0,v.jsx)("thead",{children:(0,v.jsx)("tr",{children:(0,v.jsx)("th",{children:"Dashboard name"})})})),(0,v.jsx)("tbody",{children:t.map(((e,t)=>(0,v.jsx)("tr",{children:(0,v.jsx)("td",{children:e})},`dash-title-${t}`)))})]})]})};var $,I;const N=e=>{var t;let{libraryPanel:a,onClick:r,onDelete:o,showSecondaryActions:d}=e;const[c,u]=(0,n.useState)(!1),h=null!==(t=s.config.panels[a.model.type])&&void 0!==t?t:(0,i.X)(a.model.type).meta;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l.X,{isCurrent:!1,title:a.name,description:a.description,plugin:h,onClick:()=>null==r?void 0:r(a),onDelete:d?()=>u(!0):void 0,children:(0,v.jsx)(C,{libraryPanel:a})}),c&&(0,v.jsx)(S,{libraryPanel:a,onConfirm:()=>{null==o||o(a),u(!1)},onDismiss:()=>u(!1)})]})};function C(e){let{libraryPanel:t}=e;const a=(0,o.useStyles2)(k);return t.meta.folderUid||t.meta.folderName?t.meta.folderUid?(0,v.jsx)("span",{className:a.metaContainer,children:(0,v.jsxs)(o.Link,{href:`/dashboards/f/${t.meta.folderUid}`,children:[I||(I=(0,v.jsx)(o.Icon,{name:"folder-upload",size:"sm"})),(0,v.jsx)("span",{children:t.meta.folderName})]})}):(0,v.jsxs)("span",{className:a.metaContainer,children:[$||($=(0,v.jsx)(o.Icon,{name:"folder",size:"sm"})),(0,v.jsx)("span",{children:t.meta.folderName})]}):null}function k(e){return{metaContainer:r.css`
      display: flex;
      align-items: center;
      color: ${e.colors.text.secondary};
      font-size: ${e.typography.bodySmall.fontSize};
      padding-top: ${e.spacing(.5)};

      svg {
        margin-right: ${e.spacing(.5)};
        margin-bottom: 3px;
      }
    `}}},74669:(e,t,a)=>{a.d(t,{UO:()=>x,Xu:()=>b,tb:()=>f});var r=a(99918),n=a(80890),s=a(2937),o=a(73296),i=a(14629),l=a(44998),d=a(76913),c=a(92838),u=a(7392),h=a(69649),p=a(16777),m=a(23078),g=a(4401);function b(e){return function(t){const a=new r.w0,b=(0,n.D)((0,m.Pq)({searchString:e.searchString,perPage:e.perPage,page:e.page,excludeUid:e.currentPanelId,sortDirection:e.sortDirection,typeFilter:e.panelFilter,folderFilter:e.folderFilter})).pipe((0,l.z)((e=>{let{perPage:t,elements:a,page:r,totalCount:n}=e;return(0,s.of)((0,g.zK)({libraryPanels:a,page:r,perPage:t,totalCount:n}))})),(0,d.K)((t=>(console.error(t),(0,s.of)((0,g.zK)(Object.assign({},g.p$,{page:e.page,perPage:e.perPage})))))),(0,c.x)((()=>a.unsubscribe())),(0,u.B)());a.add((0,o.T)((0,i.H)(50).pipe((0,h.h)((0,g.xU)()),(0,p.R)(b)),b).subscribe(t))}}function x(e,t){return async function(a){try{await(0,m.UO)(e),b(t)(a)}catch(e){console.error(e)}}}function f(e){return function(t){return t instanceof Function?t(e):e(t)}}},4401:(e,t,a)=>{a.d(t,{_p:()=>d,oO:()=>l,p$:()=>s,xU:()=>o,zK:()=>i});var r=a(53772),n=a(43215);const s={loadingState:n.LoadingState.Loading,libraryPanels:[],totalCount:0,perPage:40,page:1,numberOfPages:0,currentPanelId:void 0},o=(0,r.PH)("libraryPanels/view/initSearch"),i=(0,r.PH)("libraryPanels/view/searchCompleted"),l=(0,r.PH)("libraryPanels/view/changePage"),d=(e,t)=>{if(o.match(t))return Object.assign({},e,{loadingState:n.LoadingState.Loading});if(i.match(t)){const{libraryPanels:a,page:r,perPage:s,totalCount:o}=t.payload,i=Math.ceil(o/s);return Object.assign({},e,{libraryPanels:a,perPage:s,totalCount:o,loadingState:n.LoadingState.Done,numberOfPages:i,page:r>i?r-1:r})}return l.match(t)?Object.assign({},e,{page:t.payload.page}):e}},34751:(e,t,a)=>{a.d(t,{J:()=>n});var r=a(36636);function n(e){return{myTable:r.css`
      max-height: 204px;
      overflow-y: auto;
      margin-top: 11px;
      margin-bottom: 28px;
      border-radius: ${e.border.radius.sm};
      border: 1px solid ${e.colors.bg3};
      background: ${e.colors.bg1};
      color: ${e.colors.textSemiWeak};
      font-size: ${e.typography.size.md};
      width: 100%;

      thead {
        color: #538ade;
        font-size: ${e.typography.size.sm};
      }

      th,
      td {
        padding: 6px 13px;
        height: ${e.spacing.xl};
      }

      tbody > tr:nth-child(odd) {
        background: ${e.colors.bg2};
      }
    `,noteTextbox:r.css`
      margin-bottom: ${e.spacing.xl};
    `,textInfo:r.css`
      color: ${e.colors.textSemiWeak};
      font-size: ${e.typography.size.sm};
    `,dashboardSearch:r.css`
      margin-top: ${e.spacing.md};
    `,modal:r.css`
      width: 500px;
    `,modalText:r.css`
      font-size: ${e.typography.heading.h4};
      color: ${e.colors.link};
      margin-bottom: calc(${e.spacing.d} * 2);
      padding-top: ${e.spacing.d};
    `}}},54948:(e,t,a)=>{a.r(t),a.d(t,{default:()=>W});var r=a(36636),n=a(68404),s=a(18745),o=a(43215),i=a(16695),l=a(90923),d=a(69783),c=a(5831),u=a(33801),h=a(8674),p=a(45193),m=a(85189),g=a(77239),b=a(20467),x=a(95513),f=a(42235);const j=e=>{try{return JSON.parse(e),!0}catch(e){return"Not valid JSON"}},y=e=>{const t=/(^\d+$)|dashboards\/(\d+)/.exec(e);return!(!t||!t[1]&&!t[2])||"Could not find a valid Grafana.com ID"},v=e=>(0,l.getBackendSrv)().get(`/api/dashboards/uid/${e}`).then((e=>`Dashboard named '${null==e?void 0:e.dashboard.title}' in folder '${null==e?void 0:e.meta.folderTitle}' has the same UID`)).catch((e=>(e.isHandled=!0,!0)));var S=a(71585),D=a(45916);function w(e){let{inputs:t,label:a,description:r,folderName:n}=e;const s=(0,d.useStyles2)(P);return Boolean(null==t?void 0:t.length)?(0,D.jsx)("div",{className:s.spacer,children:(0,D.jsx)(d.Field,{label:a,description:r,children:(0,D.jsx)(D.Fragment,{children:t.map(((e,t)=>{const a=`elements[${t}]`,r=e.state===g.KQ.New?Object.assign({},e.model,{meta:Object.assign({},e.model.meta,{folderName:null!=n?n:"General"})}):Object.assign({},e.model);return(0,D.jsx)("div",{className:s.item,children:(0,D.jsx)(S.p,{libraryPanel:r,onClick:()=>{}})},a)}))})})}):null}function P(e){return{spacer:r.css`
      margin-bottom: ${e.spacing(2)};
    `,item:r.css`
      margin-bottom: ${e.spacing(1)};
    `}}const $=["ref"],I=["ref"];var N;function C(e,t){if(null==e)return{};var a,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)a=s[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}const k=e=>{var t,a,r,s;let{register:o,errors:c,control:u,getValues:h,uidReset:p,inputs:m,initialFolderId:j,onUidReset:y,onCancel:S,onSubmit:P,watch:k}=e;const[U,L]=(0,n.useState)(!1),T=k("dataSources"),z=k("folder");(0,n.useEffect)((()=>{U&&(c.title||c.uid)&&P(h(),{})}),[c,h,U,P]);const J=null!==(t=null==m||null===(a=m.libraryPanels)||void 0===a?void 0:a.filter((e=>e.state===g.KQ.New)))&&void 0!==t?t:[],B=null!==(r=null==m||null===(s=m.libraryPanels)||void 0===s?void 0:s.filter((e=>e.state===g.KQ.Exists)))&&void 0!==r?r:[];return(0,D.jsxs)(D.Fragment,{children:[N||(N=(0,D.jsx)(d.Legend,{children:"Options"})),(0,D.jsx)(d.Field,{label:"Name",invalid:!!c.title,error:c.title&&c.title.message,children:(0,D.jsx)(d.Input,Object.assign({},o("title",{required:"Name is required",validate:async e=>{return await(t=e,a=h().folder.id,f.t.validateNewDashboardName(a,t).then((()=>!0)).catch((e=>{if("EXISTING"===e.type)return e.message})));var t,a}}),{type:"text","data-testid":i.wl.components.ImportDashboardForm.name}))}),(0,D.jsx)(d.Field,{label:"Folder",children:(0,D.jsx)(d.InputControl,{render:e=>{let{}=e,t=C(e.field,$);return(0,D.jsx)(x.E,Object.assign({},t,{enableCreateNew:!0,initialFolderId:j}))},name:"folder",control:u})}),(0,D.jsx)(d.Field,{label:"Unique identifier (UID)",description:"The unique identifier (UID) of a dashboard can be used for uniquely identify a dashboard between multiple Grafana installs. The UID allows having consistent URLs for accessing dashboards so changing the title of a dashboard will not break any bookmarked links to that dashboard.",invalid:!!c.uid,error:c.uid&&c.uid.message,children:(0,D.jsx)(D.Fragment,{children:p?(0,D.jsx)(d.Input,Object.assign({},o("uid",{required:!0,validate:async e=>await v(e)}))):(0,D.jsx)(d.Input,Object.assign({disabled:!0},o("uid",{validate:async e=>await v(e)}),{addonAfter:!p&&(0,D.jsx)(d.Button,{onClick:y,children:"Change uid"})}))})}),m.dataSources&&m.dataSources.map(((e,t)=>{if(e.pluginId===b.hr.type)return null;const a=`dataSources[${t}]`,r=null!=T?T:[];return(0,D.jsx)(d.Field,{label:e.label,invalid:c.dataSources&&!!c.dataSources[t],error:c.dataSources&&c.dataSources[t]&&"A data source is required",children:(0,D.jsx)(d.InputControl,{name:a,render:a=>{var n;let{}=a,s=C(a.field,I);return(0,D.jsx)(l.DataSourcePicker,Object.assign({},s,{noDefault:!0,placeholder:e.info,pluginId:e.pluginId,current:null===(n=r[t])||void 0===n?void 0:n.uid}))},control:u,rules:{required:!0}})},a)})),m.constants&&m.constants.map(((e,t)=>{const a=`constants[${t}]`;return(0,D.jsx)(d.Field,{label:e.label,error:c.constants&&c.constants[t]&&`${e.label} needs a value`,invalid:c.constants&&!!c.constants[t],children:(0,D.jsx)(d.Input,Object.assign({},o(a,{required:!0}),{defaultValue:e.value}))},a)})),(0,D.jsx)(w,{inputs:J,label:"New library panels",description:"List of new library panels that will get imported.",folderName:z.title}),(0,D.jsx)(w,{inputs:B,label:"Existing library panels",description:"List of existing library panels. These panels are not affected by the import.",folderName:z.title}),(0,D.jsxs)(d.HorizontalGroup,{children:[(0,D.jsx)(d.Button,{type:"submit","data-testid":i.wl.components.ImportDashboardForm.submit,variant:F(c),onClick:()=>{L(!0)},children:O(c)}),(0,D.jsx)(d.Button,{type:"reset",variant:"secondary",onClick:S,children:"Cancel"})]})]})};function F(e){return e&&(e.title||e.uid)?"destructive":"primary"}function O(e){return e&&(e.title||e.uid)?"Import (Overwrite)":"Import"}var U,L;function T(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const z={clearLoadedDashboard:m.ys,importDashboard:m.$j},J=(0,s.connect)((e=>{const t=l.locationService.getSearchObject();return{dashboard:e.importDashboard.dashboard,meta:e.importDashboard.meta,source:e.importDashboard.source,inputs:e.importDashboard.inputs,folder:t.folderId?{id:Number(t.folderId)}:{id:0}}}),z);class B extends n.PureComponent{constructor(){super(...arguments),T(this,"state",{uidReset:!1}),T(this,"onSubmit",(e=>{(0,l.reportInteraction)("dashboard_import_imported"),this.props.importDashboard(e)})),T(this,"onCancel",(()=>{this.props.clearLoadedDashboard()})),T(this,"onUidReset",(()=>{this.setState({uidReset:!0})}))}render(){const{dashboard:e,inputs:t,meta:a,source:r,folder:n}=this.props,{uidReset:s}=this.state;return(0,D.jsxs)(D.Fragment,{children:[r===g.G7.Gcom&&(0,D.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,D.jsx)("div",{children:(0,D.jsxs)(d.Legend,{children:["Importing dashboard from"," ",(0,D.jsx)("a",{href:`https://grafana.com/dashboards/${e.gnetId}`,className:"external-link",target:"_blank",rel:"noreferrer",children:"Grafana.com"})]})}),(0,D.jsx)("table",{className:"filter-table form-inline",children:(0,D.jsxs)("tbody",{children:[(0,D.jsxs)("tr",{children:[U||(U=(0,D.jsx)("td",{children:"Published by"})),(0,D.jsx)("td",{children:a.orgName})]}),(0,D.jsxs)("tr",{children:[L||(L=(0,D.jsx)("td",{children:"Updated on"})),(0,D.jsx)("td",{children:(0,o.dateTimeFormat)(a.updatedAt)})]})]})})]}),(0,D.jsx)(d.Form,{onSubmit:this.onSubmit,defaultValues:Object.assign({},e,{constants:[],dataSources:[],elements:[],folder:n}),validateOnMount:!0,validateFieldsOnMount:["title","uid"],validateOn:"onChange",children:e=>{let{register:a,errors:r,control:o,watch:i,getValues:l}=e;return(0,D.jsx)(k,{register:a,errors:r,control:o,getValues:l,uidReset:s,inputs:t,onCancel:this.onCancel,onUidReset:this.onUidReset,onSubmit:this.onSubmit,watch:i,initialFolderId:n.id})}})]})}}const R=J(B);var G,q,A;function _(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}R.displayName="ImportDashboardOverview";const E="dashboard_import_loaded",M={fetchGcomDashboard:m.q_,importDashboardJson:m.nQ,cleanUpAction:p.e},V=(0,s.connect)((e=>({navModel:(0,h.h)(e.navIndex,"import",void 0,!0),loadingState:e.importDashboard.state})),M);class H extends n.PureComponent{constructor(e){super(e),_(this,"onFileUpload",(e=>{(0,l.reportInteraction)(E,{import_source:"json_uploaded"});const{importDashboardJson:t}=this.props,a=e.currentTarget.files&&e.currentTarget.files.length>0&&e.currentTarget.files[0];if(a){const e=new FileReader,r=()=>e=>{let a;try{a=JSON.parse(e.target.result)}catch(e){return void c.Z.emit(o.AppEvents.alertError,["Import failed","JSON -> JS Serialization failed: "+e.message])}t(a)};e.onload=r(),e.readAsText(a)}})),_(this,"getDashboardFromJson",(e=>{(0,l.reportInteraction)(E,{import_source:"json_pasted"}),this.props.importDashboardJson(JSON.parse(e.dashboardJson))})),_(this,"getGcomDashboard",(e=>{let t;(0,l.reportInteraction)(E,{import_source:"gcom"});const a=/(^\d+$)|dashboards\/(\d+)/.exec(e.gcomDashboard);a&&a[1]?t=a[1]:a&&a[2]&&(t=a[2]),t&&this.props.fetchGcomDashboard(t)}));const{gcomDashboardId:t}=this.props.queryParams;t&&this.getGcomDashboard({gcomDashboard:t})}componentWillUnmount(){this.props.cleanUpAction({stateSelector:e=>e.importDashboard})}renderImportForm(){const e=X(this.props.theme);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("div",{className:e.option,children:(0,D.jsx)(d.FileUpload,{accept:"application/json",onFileUpload:this.onFileUpload,children:"Upload JSON file"})}),(0,D.jsx)("div",{className:e.option,children:(0,D.jsx)(d.Form,{onSubmit:this.getGcomDashboard,defaultValues:{gcomDashboard:""},children:e=>{let{register:t,errors:a}=e;return(0,D.jsx)(d.Field,{label:"Import via grafana.com",invalid:!!a.gcomDashboard,error:a.gcomDashboard&&a.gcomDashboard.message,children:(0,D.jsx)(d.Input,Object.assign({id:"url-input",placeholder:"Grafana.com dashboard URL or ID",type:"text"},t("gcomDashboard",{required:"A Grafana dashboard URL or ID is required",validate:y}),{addonAfter:G||(G=(0,D.jsx)(d.Button,{type:"submit",children:"Load"}))}))})}})}),(0,D.jsx)("div",{className:e.option,children:(0,D.jsx)(d.Form,{onSubmit:this.getDashboardFromJson,defaultValues:{dashboardJson:""},children:e=>{let{register:t,errors:a}=e;return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(d.Field,{label:"Import via panel json",invalid:!!a.dashboardJson,error:a.dashboardJson&&a.dashboardJson.message,children:(0,D.jsx)(d.TextArea,Object.assign({},t("dashboardJson",{required:"Need a dashboard JSON model",validate:j}),{"data-testid":i.wl.components.DashboardImportPage.textarea,id:"dashboard-json-textarea",rows:10}))}),(0,D.jsx)(d.Button,{type:"submit","data-testid":i.wl.components.DashboardImportPage.submit,children:"Load"})]})}})})]})}render(){const{loadingState:e,navModel:t}=this.props;return(0,D.jsx)(u.Z,{navModel:t,children:(0,D.jsxs)(u.Z.Contents,{children:[e===o.LoadingState.Loading&&(q||(q=(0,D.jsx)(d.VerticalGroup,{justify:"center",children:(0,D.jsx)(d.HorizontalGroup,{justify:"center",children:(0,D.jsx)(d.Spinner,{size:32})})}))),[o.LoadingState.Error,o.LoadingState.NotStarted].includes(e)&&this.renderImportForm(),e===o.LoadingState.Done&&(A||(A=(0,D.jsx)(R,{})))]})})}}const K=V((0,d.withTheme2)(H));K.displayName="DashboardImport";const W=K,X=(0,d.stylesFactory)((e=>({option:r.css`
      margin-bottom: ${e.spacing(4)};
    `})))},87092:(e,t,a)=>{a.d(t,{X:()=>d});var r=a(36636),n=(a(68404),a(43215)),s=a(16695),o=a(69783),i=a(30978),l=a(45916);const d=e=>{let{isCurrent:t,title:a,plugin:i,onClick:d,onDelete:h,disabled:p,showBadge:m,description:g,children:b}=e;const x=(0,o.useStyles2)(c),f=(0,r.cx)({[x.item]:!0,[x.disabled]:p||i.state===n.PluginState.deprecated,[x.current]:t});return(0,l.jsxs)("div",{className:f,"aria-label":s.wl.components.PluginVisualization.item(i.name),onClick:p?void 0:d,title:t?"Click again to close this section":i.name,children:[(0,l.jsx)("img",{className:x.img,src:i.info.logos.small,alt:""}),(0,l.jsxs)("div",{className:x.itemContent,children:[(0,l.jsx)("div",{className:x.name,children:a}),g?(0,l.jsx)("span",{className:x.description,children:g}):null,b]}),m&&(0,l.jsx)("div",{className:(0,r.cx)(x.badge,p&&x.disabled),children:(0,l.jsx)(u,{plugin:i})}),h&&(0,l.jsx)(o.IconButton,{name:"trash-alt",onClick:e=>{e.stopPropagation(),h()},className:x.deleteButton,"aria-label":"Delete button on panel type card"})]})};d.displayName="PanelTypeCard";const c=e=>({item:r.css`
      position: relative;
      display: flex;
      flex-shrink: 0;
      cursor: pointer;
      background: ${e.colors.background.secondary};
      border-radius: ${e.shape.borderRadius()};
      box-shadow: ${e.shadows.z1};
      border: 1px solid ${e.colors.background.secondary};
      align-items: center;
      padding: 8px;
      width: 100%;
      position: relative;
      overflow: hidden;
      transition: ${e.transitions.create(["background"],{duration:e.transitions.duration.short})};

      &:hover {
        background: ${e.colors.emphasize(e.colors.background.secondary,.03)};
      }
    `,itemContent:r.css`
      overflow: hidden;
      position: relative;
      padding: ${e.spacing(0,1)};
    `,current:r.css`
      label: currentVisualizationItem;
      border: 1px solid ${e.colors.primary.border};
      background: ${e.colors.action.selected};
    `,disabled:r.css`
      opacity: 0.2;
      filter: grayscale(1);
      cursor: default;
      pointer-events: none;
    `,name:r.css`
      text-overflow: ellipsis;
      overflow: hidden;
      font-size: ${e.typography.size.sm};
      font-weight: ${e.typography.fontWeightMedium};
      width: 100%;
    `,description:r.css`
      display: block;
      text-overflow: ellipsis;
      overflow: hidden;
      color: ${e.colors.text.secondary};
      font-size: ${e.typography.bodySmall.fontSize};
      font-weight: ${e.typography.fontWeightLight};
      width: 100%;
      max-height: 4.5em;
    `,img:r.css`
      max-height: 38px;
      width: 38px;
      display: flex;
      align-items: center;
    `,badge:r.css`
      background: ${e.colors.background.primary};
    `,deleteButton:r.css`
      margin-left: auto;
    `}),u=e=>{let{plugin:t}=e;return(0,n.isUnsignedPluginSignature)(t.signature)?(0,l.jsx)(o.PluginSignatureBadge,{status:t.signature}):(0,l.jsx)(i.u,{state:t.state})};u.displayName="PanelPluginBadge"},30978:(e,t,a)=>{a.d(t,{u:()=>o});a(68404);var r=a(43215),n=a(69783),s=a(45916);const o=e=>{const t=function(e){switch(e){case r.PluginState.deprecated:return{text:"Deprecated",color:"red",tooltip:"This feature is deprecated and will be removed in a future release"};case r.PluginState.alpha:return{text:"Alpha",color:"blue",tooltip:"This feature is experimental and future updates might not be backward compatible"};case r.PluginState.beta:return{text:"Beta",color:"blue",tooltip:"This feature is close to complete but not fully tested"};default:return null}}(e.state);return t?(0,s.jsx)(n.Badge,{color:t.color,title:t.tooltip,text:t.text,icon:t.icon}):null}}}]);
//# sourceMappingURL=DashboardImport.eb3a3448f35ab8116a37.js.map