import{u as d,ci as p,a as m,b as x,j as t,C as c,a4 as u,r as h,e as f}from"./bundle.CHKSNOJF.js";const i=u.div`
  color: ${r=>r.theme.color};

  &:hover {
    background-color: ${r=>r.theme.hoverColor};
  }
`;function y(){const[r]=d(),{id:n}=p(),s=m(),{data:o}=x({queryKey:["/api/v1/clients/show_settings",n],queryFn:()=>h("POST",f("/api/v1/clients/:id/show_settings",{id:n})).then(e=>e.data),enabled:n!==null,staleTime:1/0}),a=e=>typeof e=="boolean"?r(e?"yes":"no"):typeof e=="string"?r(e):e;return t.jsxs("div",{className:"flex flex-col space-y-4 xl:flex-row xl:space-x-6 xl:space-y-0 w-full",children:[t.jsx(c,{title:r("client_settings"),className:"shadow-sm w-full xl:w-1/2 h-max pb-4",style:{borderColor:s.$24},headerStyle:{borderColor:s.$20},children:o?.client_settings&&!Array.isArray(o?.client_settings)&&Object.keys(o.client_settings).length>0?t.jsx("div",{className:"flex flex-col space-y-1 px-2 sm:px-4 pt-2",children:Object.entries(o.client_settings).filter(([e,l])=>e.toLowerCase()!=="id"||!e||!l).map(([e,l])=>t.jsxs(i,{className:"flex w-full items-center space-x-2 px-2 py-1.5 rounded-sm",theme:{hoverColor:s.$4,color:s.$1},children:[t.jsx("div",{className:"font-medium w-1/2 whitespace-nowrap truncate",style:{color:s.$3},children:e}),t.jsx("div",{className:"w-1/2 whitespace-nowrap truncate",style:{color:s.$3},children:a(l)})]},e))}):t.jsxs("div",{className:"px-4 sm:px-6 pt-2 font-medium",style:{color:s.$3},children:[r("no_records_found"),"."]})}),t.jsx(c,{title:r("group_settings"),className:"shadow-sm w-full xl:w-1/2 h-max pb-4",style:{borderColor:s.$24},headerStyle:{borderColor:s.$20},children:o?.group_settings&&!Array.isArray(o?.group_settings)&&Object.keys(o.group_settings).length>0?t.jsx("div",{className:"flex flex-col space-y-2 px-4 sm:px-6",children:Object.entries(o.group_settings).filter(([e,l])=>e.toLowerCase()!=="id"||!e||!l).map(([e,l])=>t.jsxs(i,{className:"flex w-full items-center space-x-2 px-2 py-1.5 rounded-sm",theme:{hoverColor:s.$4,color:s.$1},children:[t.jsx("div",{className:"font-medium w-1/2 whitespace-nowrap truncate",style:{color:s.$3},children:e}),t.jsx("div",{className:"w-1/2 whitespace-nowrap truncate",style:{color:s.$3},children:a(l)})]},e))}):t.jsxs("div",{className:"px-4 sm:px-6 pt-2 font-medium",style:{color:s.$3},children:[r("no_records_found"),"."]})})]})}export{y as default};
