import{al as e,_ as __,ab as t,k as n,P as a,I as o,B as s}from"./DE-SIukw.js";import{o as c}from"./CFYXg6N-.js";import{F as r}from"./6Np5euiX.js";const i=({useLimitedDashboardList:n}={})=>{const{httpClient:a,metricool:o}=e();return{connectedAccountsQuery:c({queryKey:["connected","accounts"],queryFn:()=>a.setRoute("connected_networks").get(),staleTime:3e5,select:e=>{const a=[{label:"WordPress",unconnectedLabel:__("Connect Wordpress","metricool"),icon:"web",connectedClasses:"text-web",unconnectedClasses:"bg-web border-web hover:bg-transparent hover:**:data-content:text-web",upsell:!1,metricoolWebsitePath:"evolution/web",isConnected:!!e.data.web?.url,...e.data.web&&e.data.web.url&&{userName:e.data.web.url}},{label:"Blog",unconnectedLabel:__("Connect a Blog","metricool"),icon:"web",connectedClasses:"text-blog",unconnectedClasses:"bg-blog border-blog hover:bg-transparent hover:**:data-content:text-blog",upsell:!1,metricoolWebsitePath:"evolution/web",isConnected:!!e.data.web?.feedRss,...e.data.web&&e.data.web.feedRss&&{userName:e.data.web.feedRss}},{label:"Facebook",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Facebook"]),icon:"facebook",connectedClasses:"text-facebook",unconnectedClasses:"bg-facebook border-facebook hover:bg-transparent hover:**:data-content:text-facebook",upsell:!1,metricoolWebsitePath:"evolution/facebookPage",isConnected:!!e.data.facebook?.username,...e.data.facebook&&{userName:e.data.facebook.username}},{label:"Instagram",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect an %1$s Account","metricool"),["Instagram"]),icon:"instagram",connectedClasses:"text-instagram",unconnectedClasses:"bg-instagram border-instagram hover:bg-transparent hover:**:data-content:text-instagram",upsell:!1,metricoolWebsitePath:"evolution/instagram",isConnected:!!e.data.instagram?.username,...e.data.instagram&&{userName:e.data.instagram.username}},{label:"Threads",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Threads"]),icon:"threads",connectedClasses:"text-threads",unconnectedClasses:"bg-threads border-threads hover:bg-transparent hover:**:data-content:text-threads",upsell:!1,metricoolWebsitePath:"evolution/threads",isConnected:!!e.data.threads?.username,...e.data.threads&&{userName:e.data.threads.username}},{label:"Twitter / X",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Twitter / X"]),icon:"twitter",connectedClasses:"text-x",unconnectedClasses:"bg-x border-x hover:bg-transparent hover:**:data-content:text-x",upsell:!o.account?.is_premium,metricoolWebsitePath:"evolution/twitter",isConnected:!!e.data.twitter?.username,...e.data.twitter&&{userName:e.data.twitter.username}},{label:"Bluesky",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Bluesky"]),icon:"bluesky",connectedClasses:"text-bluesky",unconnectedClasses:"bg-bluesky border-bluesky hover:bg-transparent hover:**:data-content:text-bluesky",upsell:!1,metricoolWebsitePath:"evolution/bluesky",isConnected:!!e.data.bluesky?.username,...e.data.bluesky&&{userName:e.data.bluesky.username}},{label:"Pinterest",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Pinterest"]),icon:"pinterest",connectedClasses:"text-pinterest",unconnectedClasses:"bg-pinterest border-pinterest hover:bg-transparent hover:**:data-content:text-pinterest",upsell:!1,metricoolWebsitePath:"evolution/pinterest",isConnected:!!e.data.pinterest?.username,...e.data.pinterest&&{userName:e.data.pinterest.username}},{label:`TikTok ${e.data.tiktok?e.data.tiktok.accountType.toLowerCase():""}`,unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),[`TikTok ${e.data.tiktok?e.data.tiktok.accountType.toLowerCase():""}`]),icon:"tiktok",connectedClasses:"text-tiktok",unconnectedClasses:"bg-tiktok border-tiktok hover:bg-transparent hover:**:data-content:text-tiktok",upsell:!1,metricoolWebsitePath:"evolution/tiktok",isConnected:!!e.data.tiktok?.username,...e.data.tiktok&&{userName:e.data.tiktok.username}},{label:"Google Business Profile",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Google Business Profile"]),icon:"gbp",connectedClasses:"text-gbp",unconnectedClasses:"bg-gbp border-gbp hover:bg-transparent hover:**:data-content:text-gbp",upsell:!1,metricoolWebsitePath:"evolution/gmb",isConnected:!!e.data.gbp?.username,...e.data.gbp&&{userName:e.data.gbp.username}},{label:"YouTube",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["YouTube"]),icon:"youtube",connectedClasses:"text-youtube",unconnectedClasses:"bg-youtube border-youtube hover:bg-transparent hover:**:data-content:text-youtube",upsell:!1,metricoolWebsitePath:"evolution/youtube",isConnected:!!e.data.youtube?.username,...e.data.youtube&&{userName:e.data.youtube.username}},{label:"LinkedIn",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["LinkedIn"]),icon:"linkedIn",connectedClasses:"text-linkedin",unconnectedClasses:"bg-linkedin border-linkedin hover:bg-transparent hover:**:data-content:text-linkedin",upsell:!o.account?.is_premium,metricoolWebsitePath:"evolution/linkedin",isConnected:!!e.data.linkedin?.username,...e.data.linkedin&&{userName:e.data.linkedin.username}},{label:"Twitch",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Twitch"]),icon:"twitch",connectedClasses:"text-twitch",unconnectedClasses:"bg-twitch border-twitch hover:bg-transparent hover:**:data-content:text-twitch",upsell:!1,metricoolWebsitePath:"evolution/twitch",isConnected:!!e.data.twitch?.username,...e.data.twitch&&{userName:e.data.twitch.username}},{label:"Meta Ads",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Meta Ads"]),icon:"meta",connectedClasses:"text-facebook",unconnectedClasses:"bg-facebook border-facebook hover:bg-transparent hover:**:data-content:text-facebook",upsell:!1,metricoolWebsitePath:"evolution/facebookAds",isConnected:!!e.data.facebookAds?.username,...e.data.facebookAds&&{userName:e.data.facebookAds.username}},{label:"Google Ads",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["Google Ads"]),icon:"googleAds",connectedClasses:"text-ga",unconnectedClasses:"bg-ga border-ga hover:bg-transparent hover:**:data-content:text-ga",upsell:!1,metricoolWebsitePath:"evolution/googleAds",isConnected:!!e.data.googleAds?.providerUserId,...e.data.googleAds&&{userName:e.data.googleAds.providerUserId}},{label:"TikTok Ads",unconnectedLabel:t(
/*translators: variable is the name of a social media*/
__("Connect a %1$s Account","metricool"),["TikTok Ads"]),icon:"tiktok",connectedClasses:"text-tiktok",unconnectedClasses:"bg-tiktok border-tiktok hover:bg-transparent hover:**:data-content:text-tiktok",upsell:!1,metricoolWebsitePath:"evolution/tiktokAds",isConnected:!!e.data.tiktokAds?.username,...e.data.tiktokAds&&{userName:e.data.tiktokAds.username}}];return n?a.filter(e=>["WordPress","Twitter / X","YouTube","LinkedIn"].includes(e.label)):a}})}},l=({label:e,unconnectedLabel:t,icon:c,connectedClasses:i,unconnectedClasses:l,upsell:d,userName:u,link:b,isConnected:m})=>{const k=n("flex flex-row rounded-sm border-1 w-full min-h-[48px] px-2 items-center gap-2",m?"border-neutral-200":`${l} cursor-pointer transition-all duration-300 ease-in-out`),g=m?"div":"a";return a.jsxs(g,{className:k,href:b,target:"_blank",children:[a.jsx(r,{direction:"row",className:"min-w-[25px] items-center justify-center",children:a.jsx(o,{"data-content":!0,icon:c,className:n("size-6 transition-all duration-300 ease-in-out",m?i:"text-white")})}),a.jsxs(r,{direction:"row",className:"justify-between items-center grow",children:[a.jsx(r,{direction:"column",className:n("text-sm justify-center !gap-0"),children:m?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-gray-500",children:e}),a.jsx("div",{className:"font-semibold",children:u})]}):a.jsx("span",{"data-content":!0,className:"text-white transition-all duration-300 ease-in-out",children:t})}),a.jsxs(r,{direction:"row",children:[m&&a.jsx(s,{size:"icon",variant:"icon",link:b,children:a.jsx(o,{icon:"settings"})}),d&&a.jsx(o,{icon:"upsell",className:"size-2.5 p-0.5 bg-upsell rounded-full text-black"})]})]})]})};export{l as A,i as u};
