import{s as c}from"./service.541fc1e6.js";import{_ as l,G as _,r as d,o as t,c as f,w as p,a as h,b as s,t as n,e as o}from"./index.868de8fa.js";const m={name:"Prowlarr",mixins:[c],props:{item:Object},components:{Generic:_},data:()=>({warnings:null,errors:null,serverError:!1}),created:function(){this.fetchConfig()},methods:{fetchConfig:function(){this.fetch(`/api/v1/health?apikey=${this.item.apikey}`).then(r=>{this.warnings=0,this.errors=0;for(var e=0;e{console.error(r),this.serverError=!0})}}},g={class:"notifs"},u={key:0,class:"notif warnings",title:"Warning"},w={key:1,class:"notif errors",title:"Error"},y={key:2,class:"notif errors",title:"Connection error to Prowlarr API, check url and apikey in config.yml"};function v(r,e,i,k,C,E){const a=d("Generic");return t(),f(a,{item:i.item},{indicator:p(()=>[h("div",g,[r.warnings>0?(t(),s("strong",u,n(r.warnings),1)):o("",!0),r.errors>0?(t(),s("strong",w,n(r.errors),1)):o("",!0),r.serverError?(t(),s("strong",y," ? ")):o("",!0)])]),_:1},8,["item"])}const G=l(m,[["render",v],["__scopeId","data-v-d43ad11a"]]);export{G as default};