PageSourceSearch

https://app.englobe.com.br/assets/profile-Bm4Pu55K.js

js englobe.com.br collected 2026-10-09 01:11:50 UTC 22,050 bytes, 1 lines download raw bytes

1import{r,W as Z,bp as ve,j as e,a4 as u,dF as ee,aJ as se,ct as z,cE as ae,cs as te,eI as je,cM as we,aY as re,aE as Ne,d4 as be,cp as ye,eJ as ke,aK as Se,ak as Ce,a5 as Pe}from"./vendor-BePtSdgf.js";import{a as Ae,h as Ee,w as Te,x as Ge,t as Ue,y as ze,B as y,I as d,r as F,q as Fe,f as p,g as Me}from"./index-CzYyT236.js";import{L as h}from"./label-B3EVfI4s.js";import{S as le,a as ie,b as ne,c as oe,d as m}from"./select-CFZjVftf.js";const k="englobe_profile_extra";function Re(t){return t.split(" ").map(i=>i[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function We(){const{toast:t}=Ae(),{profile:i,refreshProfile:M,isRoot:R}=Ee(),f=r.useRef(null),[j,B]=r.useState(""),[I,w]=r.useState(""),[x,L]=r.useState(""),[g,O]=r.useState(""),[l,N]=r.useState({current:"",newPass:"",confirm:""}),[o,S]=r.useState({language:"pt-BR",timezone:"America/Sao_Paulo",theme:"light"}),[n,C]=r.useState({novasTarefas:{email:!0,desktop:!1},prazosProximos:{email:!0,desktop:!0},mencoes:{email:!0,desktop:!0}}),[W,q]=r.useState(!1),[J,_]=r.useState(!1),[P,H]=r.useState(!1),[b,D]=r.useState(!1),K=r.useRef(!1),A=r.useRef(!1),{data:c,refetch:ce}=Z({queryKey:["/api/google-calendar/status"],refetchOnWindowFocus:!1}),{data:V}=Z({queryKey:["/api/google/credentials-status"],refetchOnWindowFocus:!1}),E=ve({mutationFn:()=>p("DELETE","/api/google-calendar/disconnect"),onSuccess:()=>{Fe.invalidateQueries({queryKey:["/api/google-calendar/status"]}),t({title:"Google Agenda desconectada"})},onError:()=>t({title:"Erro ao desconectar",variant:"destructive"})}),[T,$]=r.useState(!1),de=async()=>{$(!0);try{const s=await p("POST","/api/admin/google/root-auth-url"),{url:a}=await s.json();if(!a)throw new Error("Não foi possível iniciar a autorização Google");window.open(a,"_blank","noopener,noreferrer"),t({title:"Continue a autorização na nova aba do Google"})}catch(s){t({title:"Não foi possível iniciar a conexão Google",description:s.message,variant:"destructive"})}finally{$(!1)}};r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("gcal");a==="success"?(t({title:"Google Agenda conectada com sucesso!"}),ce(),window.history.replaceState({},"",window.location.pathname)):a==="error"&&(t({title:"Erro ao conectar Google Agenda",variant:"destructive"}),window.history.replaceState({},"",window.location.pathname))},[]),r.useEffect(()=>{if(i){B(i.fullName||""),K.current?A.current?i.avatarUrl&&(w(i.avatarUrl),A.current=!1):w(i.avatarUrl||""):(K.current=!0,w(i.avatarUrl||""));try{const s=localStorage.getItem(k);if(s){const a=JSON.parse(s);a.phone&&L(a.phone),a.jobTitle&&O(a.jobTitle),a.prefs&&S(a.prefs),a.notifications&&C(a.notifications),a.twoFactor!==void 0&&D(a.twoFactor)}}catch{}}},[i]);const me=async s=>{const a=s.target.files?.[0];if(a){if(!a.type.startsWith("image/")){t({title:"Selecione um arquivo de imagem",variant:"destructive"});return}if(a.size>5*1024*1024){t({title:"A imagem deve ter no máximo 5MB",variant:"destructive"});return}H(!0);try{const U=await(await p("POST","/api/uploads/request-url-public",{name:a.name,subfolder:"avatars"})).json();if(!U.uploadURL)throw new Error("Falha ao obter URL de upload");await fetch(U.uploadURL,{method:"PUT",headers:{"Content-Type":a.type},body:a});const X=U.objectPath;A.current=!0,w(X),await p("PATCH","/api/auth/me/profile",{avatarUrl:X}),await M(),t({title:"Foto atualizada com sucesso"})}catch(v){t({title:"Erro ao enviar foto",description:v.message,variant:"destructive"})}finally{H(!1),f.current&&(f.current.value="")}}},xe=async()=>{if(!j.trim()){t({title:"O nome completo é obrigatório",variant:"destructive"});return}q(!0);try{await p("PATCH","/api/auth/me/profile",{fullName:j.trim()}),await M(),localStorage.setItem(k,JSON.stringify({phone:x,jobTitle:g,prefs:o,notifications:n,twoFactor:b})),t({title:"Perfil salvo com sucesso"})}catch(s){t({title:"Erro ao salvar perfil",description:s.message,variant:"destructive"})}finally{q(!1)}},ue=async()=>{if(!l.current||!l.newPass||!l.confirm){t({title:"Preencha todos os campos de senha",variant:"destructive"});return}if(l.newPass.length<6){t({title:"A nova senha deve ter pelo menos 6 caracteres",variant:"destructive"});return}if(l.newPass!==l.confirm){t({title:"As senhas não coincidem",variant:"destructive"});return}_(!0);try{await p("PATCH","/api/auth/me/password",{currentPassword:l.current,newPassword:l.newPass}),N({current:"",newPass:"",confirm:""}),t({title:"Senha alterada com sucesso"})}catch(s){let a=s.message||"Tente novamente.";try{const v=JSON.parse(a.replace(/^\d+:\s*/,""));v.message&&(a=v.message)}catch{}t({title:"Erro ao alterar senha",description:a,variant:"destructive"})}finally{_(!1)}}
1,pe=()=>{localStorage.setItem(k,JSON.stringify({phone:x,jobTitle:g,prefs:o,notifications:n,twoFactor:b})),t({title:"Preferências salvas"})},he=()=>{localStorage.setItem(k,JSON.stringify({phone:x,jobTitle:g,prefs:o,notifications:n,twoFactor:b})),t({title:"Preferências de notificação salvas"})},fe=async()=>{try{const s=await Me(),{error:a}=await s.auth.signInWithOAuth({provider:"google",options:{scopes:["https://www.googleapis.com/auth/calendar","https://www.googleapis.com/auth/calendar.events","https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.readonly"].join(" "),queryParams:{access_type:"offline",prompt:"consent"},redirectTo:`${window.location.origin}/settings/profile?gcal=success`}});a&&t({title:"Erro ao conectar Google",description:a.message,variant:"destructive"})}catch(s){t({title:"Erro ao iniciar integração",description:s.message,variant:"destructive"})}},G=j||i?.email?.split("@")[0]||"Usuário",ge=Re(G),Q=i?.email||"",Y=g||i?.role||"";return e.jsxs("div",{className:"-m-2 sm:-m-4 md:-m-6 flex flex-col md:flex-row md:overflow-hidden md:h-[calc(100vh-3.5rem)]",children:[e.jsxs("aside",{className:"w-full md:w-[260px] md:flex-shrink-0 bg-slate-900 flex flex-col items-center py-6 px-4 sm:py-8 sm:px-6 md:overflow-y-auto",children:[e.jsxs("div",{className:"relative group cursor-pointer mb-4 mt-2",onClick:()=>f.current?.click(),children:[e.jsxs(Te,{className:"w-24 h-24 ring-4 ring-slate-700",children:[I?e.jsx(Ge,{src:Ue(I),alt:G,className:"object-cover"}):null,e.jsx(ze,{className:"w-24 h-24 text-3xl font-medium bg-accent-purple text-white border-0",children:ge})]}),e.jsx("div",{className:"absolute inset-0 bg-black/50 rounded-full opacity-0 group-hover:opacity-100 flex items-center justify-center transition-opacity",children:P?e.jsx(u,{className:"w-6 h-6 text-white animate-spin"}):e.jsx(ee,{className:"w-6 h-6 text-white"})}),e.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:me,className:"hidden","data-testid":"input-avatar-file"})]}),e.jsx("h2",{className:"text-xl font-medium text-white tracking-tight text-center mt-1","data-testid":"text-profile-name",children:G}),e.jsx("p",{className:"text-sm text-slate-400 mt-1 mb-2 text-center","data-testid":"text-profile-role",children:Y}),e.jsx("p",{className:"text-xs text-slate-500 text-center truncate w-full",children:Q}),e.jsx("div",{className:"w-full h-px bg-slate-800 my-5"}),e.jsxs("div",{className:"w-full space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase tracking-wider font-medium",children:"Cargo"}),e.jsxs("span",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx(se,{className:"w-3.5 h-3.5 text-slate-500 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:Y||"—"})]})]}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase tracking-wider font-medium",children:"Status"}),e.jsxs("span",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx(z,{className:"w-3.5 h-3.5 text-state-success flex-shrink-0"}),"Ativo"]})]}),x&&e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase tracking-wider font-medium",children:"Telefone"}),e.jsxs("span",{className:"text-sm text-slate-300 flex items-center gap-2",children:[e.jsx(ae,{className:"w-3.5 h-3.5 text-slate-500 flex-shrink-0"}),x]})]})]}),e.jsxs("div",{className:"w-full mt-6 pt-5 border-t border-slate-800",children:[e.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wider font-medium mb-3",children:"Integrações"}),e.jsxs("div",{className:"rounded-lg border border-slate-700 p-3 bg-slate-800/50","data-testid":"card-google-workspace",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-7 w-7 rounded bg-white flex items-center justify-center flex-shrink-0",children:e.jsxs("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),e.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),e.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),e.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs font-medium text-slate-200",children:"Google Worksp
1ace"}),c?.connected?e.jsxs("p",{className:"text-xs text-state-success flex items-center gap-1 mt-0.5",children:[e.jsx(z,{className:"h-3 w-3"}),c.email]}):e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Agenda + Drive"})]})]}),R?e.jsxs("button",{className:`w-full py-1.5 text-xs border rounded transition-colors flex items-center justify-center gap-1 disabled:opacity-50 ${c?.connected?"text-state-success border-state-success/30 bg-state-success/10 hover:bg-state-success/20":"text-state-warning border-state-warning/50 bg-state-warning/10 hover:bg-state-warning/20"}`,onClick:de,disabled:T,"data-testid":"button-connect-google-workspace",children:[T?e.jsx(u,{className:"h-3 w-3 animate-spin"}):c?.connected?e.jsx(z,{className:"h-3 w-3"}):e.jsx(te,{className:"h-3 w-3"}),T?"Abrindo Google...":c?.connected?"Google Workspace conectado":"Reconectar Google Workspace"]}):c?.connected?e.jsxs("button",{className:"w-full py-1.5 text-xs text-slate-400 border border-slate-700 rounded hover:bg-slate-700 hover:text-white transition-colors flex items-center justify-center gap-1",onClick:()=>E.mutate(),disabled:E.isPending,"data-testid":"button-disconnect-google",children:[E.isPending?e.jsx(u,{className:"h-3 w-3 animate-spin"}):e.jsx(je,{className:"h-3 w-3"}),"Desconectar"]}):e.jsxs("button",{className:"w-full py-1.5 text-xs text-accent-purple border border-accent-purple/40 rounded hover:bg-accent-purple/50 transition-colors flex items-center justify-center gap-1 disabled:opacity-50",onClick:fe,disabled:V?.configured===!1,"data-testid":"button-connect-google",children:[e.jsx(we,{className:"h-3 w-3"}),"Conectar"]}),!R&&V?.configured===!1&&!c?.connected&&e.jsxs("div",{className:"mt-2 flex items-start gap-1.5 rounded bg-state-warning/30 border border-state-warning/50 p-2","data-testid":"alert-google-not-configured",children:[e.jsx(te,{className:"h-3 w-3 text-state-warning flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-state-warning leading-relaxed",children:"Solicite ao admin configurar as credenciais Google."})]})]})]}),e.jsx("div",{className:"mt-auto pt-6 w-full",children:e.jsxs("button",{className:"w-full py-2.5 px-4 rounded-lg border border-slate-700 text-slate-300 text-sm font-medium hover:bg-slate-800 hover:text-white transition-colors flex items-center justify-center gap-2",onClick:()=>f.current?.click(),disabled:P,"data-testid":"button-upload-avatar",children:[P?e.jsx(u,{className:"w-4 h-4 animate-spin"}):e.jsx(ee,{className:"w-4 h-4"}),"Editar Foto"]})})]}),e.jsx("main",{className:"flex-1 md:overflow-y-auto bg-muted/30",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 md:px-8 py-6 md:py-8",children:[e.jsxs("div",{className:"mb-5 md:mb-7",children:[e.jsxs("div",{className:"text-xs text-muted-foreground font-medium mb-1",children:["Perfil ",e.jsx("span",{className:"mx-1",children:"›"})," Configurações"]}),e.jsx("h1",{className:"text-xl md:text-2xl font-medium text-foreground tracking-tight",children:"Configurações"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5 pb-16",children:[e.jsxs("div",{className:"col-span-1 lg:col-span-2 bg-card rounded-xl border border-border shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-border/60 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between bg-muted/20",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-accent-purple/10 rounded-lg",children:e.jsx(re,{className:"w-4 h-4 text-accent-purple"})}),e.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Informações Pessoais"})]}),e.jsxs(y,{size:"sm",onClick:xe,disabled:W,"data-testid":"button-save-profile",children:[W?e.jsx(u,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}):null,"Salvar Alterações"]})]}),e.jsx("div",{className:"p-4 sm:p-6",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Nome Completo"}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground
1/60"}),e.jsx(d,{value:j,onChange:s=>B(s.target.value),className:"pl-9",placeholder:"Seu nome completo","data-testid":"input-profile-name"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"E-mail"}),e.jsxs("div",{className:"relative",children:[e.jsx(Ne,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground/60"}),e.jsx(d,{type:"email",value:Q,readOnly:!0,className:"pl-9 opacity-60 cursor-not-allowed","data-testid":"input-profile-email"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Cargo"}),e.jsxs("div",{className:"relative",children:[e.jsx(se,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground/60"}),e.jsx(d,{value:g,onChange:s=>O(s.target.value),className:"pl-9",placeholder:"Ex: Gerente de Projetos","data-testid":"input-profile-role"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(h,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Telefone"}),e.jsxs("div",{className:"relative",children:[e.jsx(ae,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground/60"}),e.jsx(d,{value:x,onChange:s=>L(s.target.value),className:"pl-9",placeholder:"+55 (11) 99999-0000","data-testid":"input-profile-phone"})]})]})]})})]}),e.jsxs("div",{className:"col-span-1 bg-card rounded-xl border border-border shadow-sm overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-border/60 flex items-center gap-3 bg-muted/20",children:[e.jsx("div",{className:"p-2 bg-destructive/10 rounded-lg",children:e.jsx(be,{className:"w-4 h-4 text-destructive"})}),e.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Segurança"})]}),e.jsxs("div",{className:"p-4 sm:p-6 flex-1 flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Mudar Senha"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(d,{type:"password",placeholder:"Senha Atual",value:l.current,onChange:s=>N({...l,current:s.target.value}),"data-testid":"input-password-current"}),e.jsx(d,{type:"password",placeholder:"Nova Senha",value:l.newPass,onChange:s=>N({...l,newPass:s.target.value}),"data-testid":"input-password-new"}),e.jsx(d,{type:"password",placeholder:"Confirmar Nova Senha",value:l.confirm,onChange:s=>N({...l,confirm:s.target.value}),"data-testid":"input-password-confirm"}),e.jsxs(y,{className:"w-full bg-slate-800 hover:bg-slate-900 dark:bg-slate-700 dark:hover:bg-slate-600 text-white",onClick:ue,disabled:J,"data-testid":"button-save-password",children:[J?e.jsx(u,{className:"h-4 w-4 animate-spin mr-1.5"}):null,"Atualizar Senha"]})]})]}),e.jsx("div",{className:"h-px w-full bg-border"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Proteção Adicional"}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-muted/40 rounded-xl border border-border",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ye,{className:"w-4 h-4 text-accent-purple flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Autenticação de Dois Fatores (2FA)"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Maior segurança para sua conta"})]})]}),e.jsx(F,{checked:b,onCheckedChange:s=>D(s),"data-testid":"switch-2fa"})]})]})]})]}),e.jsxs("div",{className:"col-span-1 bg-card rounded-xl border border-border shadow-sm overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-border/60 flex items-center gap-3 bg-muted/20",children:[e.jsx("div",{className:"p-2 bg-state-info/10 rounded-lg",children:e.jsx(ke,{className:"w-4 h-4 text-state-info"})}),e.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferências do Sistema"})]}),e.jsxs("div",{className:"p-4 sm:p-6 flex-1 flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Localização"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(h,{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[e.jsx(Se,{className:"w-3.5 h-3.5 text-muted-foreground
1/60"}),"Idioma"]}),e.jsxs(le,{value:o.language,onValueChange:s=>S({...o,language:s}),children:[e.jsx(ie,{"data-testid":"select-pref-language",children:e.jsx(ne,{})}),e.jsxs(oe,{children:[e.jsx(m,{value:"pt-BR",children:"Português (Brasil)"}),e.jsx(m,{value:"en-US",children:"English (US)"}),e.jsx(m,{value:"es",children:"Español"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(h,{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[e.jsx(Ce,{className:"w-3.5 h-3.5 text-muted-foreground/60"}),"Fuso Horário"]}),e.jsxs(le,{value:o.timezone,onValueChange:s=>S({...o,timezone:s}),children:[e.jsx(ie,{"data-testid":"select-pref-timezone",children:e.jsx(ne,{})}),e.jsxs(oe,{children:[e.jsx(m,{value:"America/Sao_Paulo",children:"Brasília (GMT-3)"}),e.jsx(m,{value:"America/Manaus",children:"Manaus (GMT-4)"}),e.jsx(m,{value:"America/Noronha",children:"Fernando de Noronha (GMT-2)"}),e.jsx(m,{value:"America/Rio_Branco",children:"Rio Branco (GMT-5)"})]})]})]})]})]}),e.jsx("div",{className:"pt-1",children:e.jsx(y,{variant:"outline",size:"sm",onClick:pe,"data-testid":"button-save-preferences",children:"Salvar Preferências"})})]})]}),e.jsxs("div",{className:"col-span-1 lg:col-span-2 bg-card rounded-xl border border-border shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-border/60 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between bg-muted/20",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-state-warning/10 rounded-lg",children:e.jsx(Pe,{className:"w-4 h-4 text-state-warning"})}),e.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Notificações"})]}),e.jsx(y,{variant:"outline",size:"sm",onClick:he,"data-testid":"button-save-notifications",children:"Salvar"})]}),e.jsx("div",{className:"px-4 sm:px-6 py-3 border-b border-border/60 bg-muted/10",children:e.jsxs("div",{className:"grid grid-cols-12 gap-4",children:[e.jsx("div",{className:"col-span-8 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Tipo de Notificação"}),e.jsx("div",{className:"col-span-2 text-center text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Email"}),e.jsx("div",{className:"col-span-2 text-center text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Desktop"})]})}),e.jsx("div",{className:"divide-y divide-border/60",children:[{key:"novasTarefas",label:"Novas Tarefas",desc:"Quando uma nova tarefa for atribuída a você"},{key:"prazosProximos",label:"Prazos Próximos",desc:"Lembretes 24h antes do vencimento"},{key:"mencoes",label:"Menções em Comentários",desc:"Quando alguém mencionar você num c
1omentário"}].map(s=>e.jsx("div",{className:"px-4 sm:px-6 py-4 hover:bg-muted/20 transition-colors","data-testid":`row-notification-${s.key}`,children:e.jsxs("div",{className:"grid grid-cols-12 gap-4 items-center",children:[e.jsxs("div",{className:"col-span-8",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.label}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s.desc})]}),e.jsx("div",{className:"col-span-2 flex justify-center",children:e.jsx(F,{checked:n[s.key].email,onCheckedChange:a=>C({...n,[s.key]:{...n[s.key],email:a}}),"data-testid":`switch-notif-${s.key}-email`})}),e.jsx("div",{className:"col-span-2 flex justify-center",children:e.jsx(F,{checked:n[s.key].desktop,onCheckedChange:a=>C({...n,[s.key]:{...n[s.key],desktop:a}}),"data-testid":`switch-notif-${s.key}-desktop`})})]})},s.key))})]})]})]})})]})}export{We as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.