import{bc as u,ay as x,p as j,ao as e,L as h,aq as n,aQ as w,ei as S,dL as f,d as b,aX as v,aZ as E,bN as L,fa as F,fi as k}from"./app-k0jcl5PQ.js";import{S as y}from"./EHuWazu9.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./ApI7cEru.chunk.js";import"./DXxHdeNz.chunk.js";import"./CpGXOT1_.chunk.js";import"./DkDkjje4.chunk.js";import"./hKqzfsO4.chunk.js";import"./fstW5ZQE.chunk.js";import"./9ls1F1Ve.chunk.js";import"./DRKUY7jf.chunk.js";const g="settings.playbackSettings",r=h.encloseNamespace(g);function T(){const s=u(),{hasPreviewVideos:a,hasUserEnabledPreviewVideos:t,isLoadingSettings:o,updateUserSetting:l}=x(j.Settings);function m(){if(!a)return;const i={name:b.UserEnabledPreviewVideos,value:!t,kind:f.FeatureFlag};l(i,()=>{s.success(r("success"))},()=>{s.error(r("error"))})}return o?e.jsx(e.Fragment,{}):e.jsxs("div",{children:[e.jsx("h2",{className:"h3",children:r("heading")}),e.jsxs("div",{className:"d-flex justify-content-between mt-2",children:[e.jsx("p",{className:"fw-semibold mb-1",children:e.jsx(n,{namespace:g,phrase:"label"})}),e.jsx(w,{title:a?"":r("tooltip"),spanHack:!0,children:e.jsx(S,{onClick:m,on:t,disabled:!a})})]}),e.jsx("p",{className:"mb-2",children:e.jsx(n,{namespace:g,phrase:"description"})})]})}const c="settings.searchSettings",p=h.encloseNamespace(c);function U(){const{showExchangeSearchResults:s,isLoadingSettings:a,updateUserSetting:t}=x(j.Settings),{hasPermissions:o,isLoaded:l}=v(),m=o(E.Exchange),i=u();function P(){const N={name:b.ShowExchangeSearchResultsUser,value:!s,kind:f.FeatureFlag};t(N,()=>{i.success(p("success"))},()=>{i.error(p("error"))})}return a||l&&!m?e.jsx(e.Fragment,{}):e.jsxs("div",{children:[e.jsx("h2",{className:"h3",children:e.jsx(n,{namespace:c,phrase:"heading"})}),e.jsxs("div",{className:"d-flex justify-content-between",children:[e.jsx("p",{className:"fw-semibold mb-1",children:e.jsx(n,{namespace:c,phrase:"label"})}),e.jsx(S,{onClick:P,on:s})]}),e.jsx("p",{className:"mb-2",children:e.jsx(n,{namespace:c,phrase:"description"})})]})}const V="settings.platformSettings",d=h.encloseNamespace(V);function z(){L({title:d("pageTitle")});const{hasProduct:s,isLoadingProducts:a}=F(),t=s(k.Exchange);return a?e.jsx(e.Fragment,{}):e.jsx(y,{heading:d("heading"),breadcrumbs:[d("heading")],children:e.jsxs("div",{className:"w-50",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx(U,{}),e.jsx("hr",{className:"my-4"})]}),e.jsx(T,{})]})})}export{z as PlatformSettingsView};
//# sourceMappingURL=DVkOp5ev.chunk.js.map
