import{n as e}from"./rolldown-runtime-BG2f4sTM.js";import{A5 as t,AZ as n,Dvt as r,I5 as i,Mft as a,Mvt as o,O_t as s,P_t as c,R5 as l,Rft as u,Vft as d,Xut as f,Zut as p,cdt as m,dC as h,fC as g,gut as _,hut as v,ii as y,in as b,jZ as x,jft as S,ldt as C,ni as w,oi as T,ri as E,rn as D}from"./app-initial-BHB6SClA.js";function O(){let e=(0,A.c)(18),t=l(),r=i(),a;e[0]===r.state?a=e[1]:(a=k(r.state),e[0]=r.state,e[1]=a);let o=a,s=r.state!=null&&typeof r.state==`object`&&!Array.isArray(r.state)?r.state:null,{data:u,isLoading:f}=c(M),p;e[2]!==o||e[3]!==s||e[4]!==t?(p=()=>{t(o,{replace:!0,state:s})},e[2]=o,e[3]=s,e[4]=t,e[5]=p):p=e[5];let m,g;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,j.jsx)(n,{className:`icon-xs`}),g=(0,j.jsx)(d,{id:`settings.openSourceLicenses.back`,defaultMessage:`Back`,description:`Button label to go back to the main settings page`}),e[6]=m,e[7]=g):(m=e[6],g=e[7]);let _;e[8]===p?_=e[9]:(_=(0,j.jsxs)(v,{color:`ghost`,size:`toolbar`,onClick:p,children:[m,g]}),e[8]=p,e[9]=_);let b,x;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,j.jsx)(d,{id:`settings.openSourceLicenses.title`,defaultMessage:`Open source licenses`,description:`Title for the open source licenses settings page`}),x=(0,j.jsx)(d,{id:`settings.openSourceLicenses.subtitle`,defaultMessage:`Third-party notices for dependencies included in this app`,description:`Subtitle for the open source licenses settings page`}),e[10]=b,e[11]=x):(b=e[10],x=e[11]);let S;e[12]!==u||e[13]!==f?(S=f?(0,j.jsx)(w,{children:(0,j.jsx)(d,{id:`settings.openSourceLicenses.loading`,defaultMessage:`Loading…`,description:`Loading label while fetching third-party notices`})}):(0,j.jsx)(D,{children:(0,j.jsx)(D.Content,{children:(0,j.jsx)(h,{children:u?.text?(0,j.jsx)(`pre`,{className:`bg-token-surface-secondary rounded p-3 text-xs leading-relaxed break-words whitespace-pre-wrap text-token-text-primary`,children:u.text}):(0,j.jsx)(`div`,{className:`text-sm text-token-text-secondary`,children:(0,j.jsx)(d,{id:`settings.openSourceLicenses.missing`,defaultMessage:`No third-party notices were found.`,description:`Message shown when the third-party notices file is missing`})})})})}),e[12]=u,e[13]=f,e[14]=S):S=e[14];let C;return e[15]!==_||e[16]!==S?(C=(0,j.jsx)(y,{backSlot:_,title:b,subtitle:x,children:S}),e[15]=_,e[16]=S,e[17]=C):C=e[17],C}function k(e){if(typeof e==`object`&&e&&!Array.isArray(e)&&`licensesBackPath`in e){let t=e.licensesBackPath;if(typeof t==`string`&&t.startsWith(`/settings/`))return t}return`/settings/general`}var A,j,M;e((()=>{A=o(),s(),u(),t(),_(),x(),a(),T(),b(),E(),g(),C(),p(),j=r(),M=f(S,`third-party-notices`,{enabled:!0,staleTime:m.ONE_MINUTE})}))();export{O as OpenSourceLicensesPage};
//# sourceMappingURL=open-source-licenses-page-BRdTD3i5.js.map