PageSourceSearch

https://rotadodono-app.com.br/assets/SocialHubBrands-RoEiNi-O.js

js rotadodono-app.com.br collected 2026-10-02 01:21:09 UTC 24,561 bytes, 18 lines download raw bytes

1import{c as K,r as d,j as e,a0 as V,af as fe,A as h,K as be,a1 as R,a2 as H,a3 as G,ag as f,L as y,aw as Ne,W as n,a as we,s as g,an as T,a5 as M,al as P,bm as ye,J as Q,ai as _e,at as ke,N as c,a6 as Ce,ay as Pe,az as Se,aA as O,bs as U,ad as B,S as Ee,k as Ie,l as ze,m as qe,n as Te,O as De,ah as Oe}from"./index-DYSNMifh.js";import{C as X,b as Z}from"./card-X20Y3rpG.js";import{s as Ue}from"./api-C-YsP7Lm.js";import{S as ee}from"./star-DE9S9l7K.js";import{G as se}from"./globe-Cxe5vRT1.js";import{Y as Be}from"./youtube-CA99B_F9.js";import{U as ae}from"./upload-D5k0-b3n.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Le=K("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Ae=K("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Fe=K("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);function re({defaultQuery:p,suggestions:u=[],orientation:_="squarish",label:L="Banco de imagens",onPick:S}){const[k,D]=d.useState(!1),[v,b]=d.useState(p||""),[j,r]=d.useState(!1),[l,E]=d.useState([]),N=async o=>{const w=o.trim();if(!w){n.error("Digite o que buscar.");return}r(!0),E([]);try{const{images:x}=await Ue({query:w,count:12,orientation:_});x!=null&&x.length?E(x):n.error("Nada encontrado.")}catch(x){n.error(x instanceof Error?x.message:"Erro na busca")}finally{r(!1)}};d.useEffect(()=>{k&&p&&l.length===0&&!j&&(b(p),N(p))},[k]);const I=o=>{S(o),D(!1),n.success("Imagem aplicada")};return e.jsxs(V,{open:k,onOpenChange:D,children:[e.jsx(fe,{asChild:!0,children:e.jsxs(h,{type:"button",variant:"outline",size:"sm",className:"h-9",children:[e.jsx(be,{className:"mr-2 h-4 w-4"}),L]})}),e.jsxs(R,{className:"max-w-2xl",children:[e.jsx(H,{children:e.jsx(G,{children:"Banco de imagens"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(f,{value:v,onChange:o=>b(o.target.value),placeholder:"Buscar no Pexels (ex: tecnologia, café, moda)",onKeyDown:o=>o.key==="Enter"&&N(v)}),e.jsx(h,{type:"button",onClick:()=>N(v),disabled:j,className:"bg-gradient-to-r from-violet-600 to-fuchsia-500",children:j?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(Ne,{className:"h-4 w-4"})})]}),u.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.map(o=>e.jsx("button",{type:"button",onClick:()=>{b(o),N(o)},className:"rounded-full border border-border px-3 py-1 text-xs hover:bg-accent",children:o},o))}),e.jsxs("div",{className:"max-h-[60vh] overflow-y-auto",children:[j&&e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(y,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),!j&&l.length===0&&e.jsx("p",{className:"py-12 text-center text-sm text-muted-foreground",children:"Pesquise por um termo ou clique em uma sugestão."}),!j&&l.length>0&&e.jsx("div",{className:"grid grid-cols-3 gap-2",children:l.map(o=>e.jsx("button",{type:"button",onClick:()=>I(o.fullUrl||o.url),className:"group overflow-hidden rounded-lg border border-border hover:ring-2 hover:ring-violet-400",title:`Foto por ${o.author}`,children:e.jsx("img",{src:o.thumbUrl||o.url,alt:o.alt,className:"aspect-square w-full object-cover transition group-hover:scale-105"})},o.id))})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Imagens fornecidas por Pexels. Configure sua chave em Configurações."})]})]})}const le=[{value:"profissional",label:"Profissional"},{value:"casual",label:"Casual"},{value:"tecnico",label:"Técnico"},{value:"inspirador",label:"Inspirador"},{value:"humoristico",label:"Humorístico"},{value:"educativo",label:"Educativo"},{value:"autoritario",label:"Autoritário"},{value:"amigavel",label:"Amigável"}],$e=Object.fromEntries(le.map(p=>[p.value,p.label])),te={name:"",description:"",tone:"",target_audience:"",industry:"",keywords:[],avoid_words:[],example_posts:[],system_prompt:"",logo_url:"",colors:["#8b5cf6","#d946ef","#ffffff"],is_default:!1,handle:"",profile_photo_url:"",website:"",social_links:{instagram:"",linkedin:"",twitter:"",facebook:"",youtube:""},values:""};function Ye(){const{empresa:p}
16=we(),u=p==null?void 0:p.id,[_,L]=d.useState([]),[S,k]=d.useState(!0),[D,v]=d.useState(!1),[b,j]=d.useState(null),[r,l]=d.useState({...te}),[E,N]=d.useState(!1),[I,o]=d.useState(!1),[w,x]=d.useState(!1),[oe,W]=d.useState(!1),[i,ie]=d.useState(null),[ne,A]=d.useState("basic"),z=d.useCallback(async()=>{if(!u)return;k(!0);const{data:s,error:a}=await g.from("social_brand_profiles").select("*").eq("empresa_id",u).order("is_default",{ascending:!1});a?(n.error("Erro ao carregar perfis"),console.error(a)):L((s||[]).map(t=>({...t,keywords:t.keywords||[],avoid_words:t.avoid_words||[],example_posts:t.example_posts||[],colors:t.colors||[],system_prompt:t.system_prompt||"",handle:t.handle||"",profile_photo_url:t.profile_photo_url||"",website:t.website||"",social_links:t.social_links||{},values:t.values||""}))),k(!1)},[u]);d.useEffect(()=>{z()},[z]);const Y=()=>{j(null),l({...te}),A("basic"),v(!0)},ce=s=>{var a;j(s.id),l({name:s.name,description:s.description||"",tone:s.tone,target_audience:s.target_audience||"",industry:s.industry||"",keywords:s.keywords||[],avoid_words:s.avoid_words||[],example_posts:s.example_posts||[],system_prompt:s.system_prompt||"",logo_url:s.logo_url||"",colors:(a=s.colors)!=null&&a.length?s.colors:["#8b5cf6","#d946ef","#ffffff"],is_default:s.is_default,handle:s.handle||"",profile_photo_url:s.profile_photo_url||"",website:s.website||"",social_links:{instagram:"",linkedin:"",twitter:"",facebook:"",youtube:"",...s.social_links},values:s.values||""}),A("basic"),v(!0)},de=async()=>{if(!r.name.trim()||!u)return;N(!0);const s={name:r.name.trim(),description:r.description,tone:r.tone||"profissional",target_audience:r.target_audience,industry:r.industry,keywords:r.keywords,avoid_words:r.avoid_words,example_posts:r.example_posts,system_prompt:r.system_prompt,logo_url:r.logo_url,colors:r.colors,is_default:r.is_default,handle:r.handle,profile_photo_url:r.profile_photo_url,website:r.website,social_links:r.social_links,values:r.values,empresa_id:u};if(b){const{error:a}=await g.from("social_brand_profiles").update(s).eq("id",b);a?n.error("Erro ao salvar"):n.success("Perfil atualizado!")}else{_.length===0&&(s.is_default=!0);const{error:a}=await g.from("social_brand_profiles").insert(s);a?n.error("Erro ao criar perfil"):n.success("Perfil criado!")}N(!1),v(!1),z()},me=async s=>{const{error:a}=await g.from("social_brand_profiles").delete().eq("id",s);a?n.error("Erro ao excluir"):(n.success("Perfil excluído"),z())},ue=async s=>{u&&(await g.from("social_brand_profiles").update({is_default:!1}).eq("empresa_id",u),await g.from("social_brand_profiles").update({is_default:!0}).eq("id",s),z(),n.success("Perfil padrão atualizado"))},xe=async s=>{var q;const a=(q=s.target.files)==null?void 0:q[0];if(!a||!u)return;x(!0);const t=a.name.split(".").pop(),m=`${u}/brands/${crypto.randomUUID()}.${t}`,{error:C}=await g.storage.from("social-media").upload(m,a);if(C){n.error("Erro no upload"),x(!1);return}const{data:F}=g.storage.from("social-media").getPublicUrl(m);l($=>({...$,logo_url:F.publicUrl})),x(!1),n.success("Logo enviado!")},he=async()=>{if(!r.name.trim()){n.error("Preencha pelo menos o nome da marca");return}o(!0);try{const{data:s,error:a}=await g.functions.invoke("brand-suggest",{body:{name:r.name,description:r.description,industry:r.industry}});if(a)throw a;if(s.error)throw new Error(s.error);l(t=>{var m,C;return{...t,tone:s.tone||t.tone,target_audience:s.target_audience||t.target_audience,industry:s.industry||t.industry,keywords:(m=s.keywords)!=null&&m.length?s.keywords:t.keywords,avoid_words:(C=s.avoid_words)!=null&&C.length?s.avoid_words:t.avoid_words,description:t.description||s.description||"",values:s.values||t.values,system_prompt:s.system_prompt||t.system_prompt}}),n.success("Sugestões da IA aplicadas!")}catch(s){n.error(s.message||"Erro ao gerar sugestões")}o(!1)},pe=(s,a)=>{l(t=>{const m=[...t.colors];return m[s]=a,{...t,colors:m}})},ge=()=>{r.colors.length<6&&l(s=>({...s,colors:[...s.colors,"#000000"]}))},ve=s=>{l(a=>({...a,colors:a.colors.filter((t,m)=>m!==s)}))},je=(s,a)=>{l(t=>({...t,social_links:{...t.social_links,[s]:a}}))},J={instagram:ye,linkedin:Ae,twitter:Fe,facebook:Le,youtube:Be};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold",children:[e.jsx(T,{className:"h-6 w-6 text-primary"}),"Perfis de Empresa"]}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:"Configure perfis para a IA gerar conteúdo com a identidade da sua marca"})]}),e.jsxs(h,{size:"sm",className:"bg-gradient-to-r from-violet-600 to-fuchsia-500",onClick:Y,children:[e.jsx(M,{className:"mr-2 h-4 w-4"}),"Novo Perfil"]}
16)]}),S&&e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx(y,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),!S&&_.length===0&&e.jsx(X,{className:"border-dashed",children:e.jsxs(Z,{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx(T,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),e.jsx("p",{className:"text-muted-foreground max-w-md",children:"Nenhum perfil cadastrado. Crie um perfil para a IA gerar conteúdo alinhado com sua marca."}),e.jsxs(h,{className:"mt-6 bg-gradient-to-r from-violet-600 to-fuchsia-500",onClick:Y,children:[e.jsx(M,{className:"mr-2 h-4 w-4"})," Criar Primeiro Perfil"]})]})}),!S&&_.length>0&&e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:_.map(s=>e.jsx(X,{className:s.is_default?"border-violet-500/50 shadow-violet-500/10 shadow-md":"",children:e.jsxs(Z,{className:"p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br from-violet-500/20 to-fuchsia-500/20 shrink-0 overflow-hidden",children:s.profile_photo_url?e.jsx("img",{src:s.profile_photo_url,alt:s.name,className:"h-10 w-10 rounded-full object-cover"}):s.logo_url?e.jsx("img",{src:s.logo_url,alt:s.name,className:"h-10 w-10 rounded-lg object-cover"}):e.jsx(T,{className:"h-6 w-6 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-bold truncate",children:s.name}),s.is_default&&e.jsx(ee,{className:"h-4 w-4 text-yellow-500 fill-yellow-500 shrink-0"})]}),s.handle&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.handle}),!s.handle&&s.industry&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.industry})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[s.tone&&e.jsx(P,{className:"bg-violet-500/10 text-violet-600 border-violet-500/20",children:$e[s.tone]||s.tone}),s.is_default&&e.jsx(P,{className:"bg-yellow-500/10 text-yellow-600 border-yellow-500/20",children:"Padrão"}),s.website&&e.jsxs(P,{variant:"outline",className:"text-xs",children:[e.jsx(se,{className:"h-3 w-3 mr-1"})," Site"]})]}),s.target_audience&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.target_audience}),s.colors.length>0&&e.jsx("div",{className:"flex gap-1.5",children:s.colors.map((a,t)=>e.jsx("div",{className:"h-5 w-5 rounded-full border border-border",style:{backgroundColor:a}},t))}),s.social_links&&Object.values(s.social_links).some(Boolean)&&e.jsx("div",{className:"flex gap-2",children:Object.entries(s.social_links).map(([a,t])=>{if(!t)return null;const m=J[a];return m?e.jsx(m,{className:"h-4 w-4 text-muted-foreground"},a):null})}),e.jsxs("div",{className:"flex gap-2 pt-2 border-t",children:[e.jsxs(h,{variant:"ghost",size:"sm",className:"flex-1 text-xs",onClick:()=>{ie(s),W(!0)},children:[e.jsx(Q,{className:"mr-1.5 h-3 w-3"})," Preview"]}),e.jsxs(h,{variant:"ghost",size:"sm",className:"flex-1 text-xs",onClick:()=>ce(s),children:[e.jsx(_e,{className:"mr-1.5 h-3 w-3"})," Editar"]}),!s.is_default&&e.jsx(h,{variant:"ghost",size:"sm",className:"text-xs",onClick:()=>ue(s.id),children:e.jsx(ee,{className:"mr-1 h-3 w-3"})}),e.jsx(h,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>me(s.id),children:e.jsx(ke,{className:"h-3 w-3"})})]})]})},s.id))}),e.jsx(V,{open:oe,onOpenChange:W,children:e.jsxs(R,{className:"max-w-md",children:[e.jsx(H,{children:e.jsx(G,{children:"Preview da Marca"})}),i&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-xl p-6 text-center",style:{background:`linear-gradient(135deg, ${i.colors[0]||"#8b5cf6"}, ${i.colors[1]||"#d946ef"})`},children:[e.jsx("div",{className:"flex items-center justify-center gap-3 mb-3",children:i.profile_photo_url?e.jsx("img",{src:i.profile_photo_url,alt:"",className:"h-14 w-14 rounded-full object-cover border-2 border-white/30"}):i.logo_url?e.jsx("img",{src:i.logo_url,alt:"",className:"h-14 w-14 roun
16ded-xl object-cover border-2 border-white/30"}):e.jsx("div",{className:"h-14 w-14 rounded-xl bg-white/20 flex items-center justify-center",children:e.jsx(T,{className:"h-7 w-7 text-white"})})}),e.jsx("h3",{className:"text-xl font-bold text-white",children:i.name}),i.handle&&e.jsx("p",{className:"text-white/80 text-sm mt-0.5",children:i.handle}),i.industry&&e.jsx("p",{className:"text-white/70 text-sm mt-1",children:i.industry})]}),i.description&&e.jsx("p",{className:"text-sm text-muted-foreground",children:i.description}),i.values&&e.jsxs("div",{children:[e.jsx(c,{className:"text-xs text-muted-foreground",children:"Missão & Valores"}),e.jsx("p",{className:"text-sm mt-1",children:i.values})]}),i.target_audience&&e.jsxs("div",{children:[e.jsx(c,{className:"text-xs text-muted-foreground",children:"Público-alvo"}),e.jsx("p",{className:"text-sm mt-1",children:i.target_audience})]}),i.keywords.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.keywords.map((s,a)=>e.jsx(P,{variant:"secondary",className:"text-xs",children:s},a))}),e.jsx("div",{className:"flex gap-2",children:i.colors.map((s,a)=>e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg border border-border",style:{backgroundColor:s}}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s})]},a))})]})]})}),e.jsx(V,{open:D,onOpenChange:v,children:e.jsxs(R,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx(H,{children:e.jsx(G,{children:b?"Editar Perfil":"Novo Perfil de Empresa"})}),e.jsxs(h,{variant:"outline",size:"sm",onClick:he,disabled:I||!r.name.trim(),className:"w-full border-dashed border-violet-500/50 text-violet-600 hover:bg-violet-500/5",children:[I?e.jsx(y,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(Ce,{className:"mr-2 h-4 w-4"}),I?"Gerando sugestões...":"Preencher com IA"]}),e.jsxs(Pe,{value:ne,onValueChange:A,children:[e.jsxs(Se,{className:"grid grid-cols-4 w-full",children:[e.jsx(O,{value:"basic",children:"Básico"}),e.jsx(O,{value:"identity",children:"Identidade"}),e.jsx(O,{value:"content",children:"Conteúdo"}),e.jsx(O,{value:"advanced",children:"Avançado"})]}),e.jsxs(U,{value:"basic",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"brand-name",children:"Nome da empresa *"}),e.jsx(f,{id:"brand-name",placeholder:"Nome da empresa",value:r.name,onChange:s=>l(a=>({...a,name:s.target.value}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"brand-desc",children:"Descrição"}),e.jsx(B,{id:"brand-desc",placeholder:"Sobre a empresa...",value:r.description,onChange:s=>l(a=>({...a,description:s.target.value})),rows:3})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Tom de voz"}),e.jsxs(Ee,{value:r.tone,onValueChange:s=>l(a=>({...a,tone:s})),children:[e.jsx(Ie,{children:e.jsx(ze,{placeholder:"Selecione"})}),e.jsx(qe,{children:le.map(s=>e.jsx(Te,{value:s.value,children:s.label},s.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"brand-industry",children:"Setor"}),e.jsx(f,{id:"brand-industry",placeholder:"Ex: Marketing Digital",value:r.industry,onChange:s=>l(a=>({...a,industry:s.target.value}))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"brand-audience",children:"Público-alvo"}),e.jsx(f,{id:"brand-audience",placeholder:"Ex: Empreendedores de 25-45 anos",value:r.target_audience,onChange:s=>l(a=>({...a,target_audience:s.target.value}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"brand-values",children:"Missão & Valores"}),e.jsx(B,{id:"brand-values",placeholder:"O que a empresa acredita e defende...",value:r.values,onChange:s=>l(a=>({...a,values:s.target.value})),rows:2})]})]}),e.jsxs(U,{value:"identity",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"brand-handle",children:"Handle (@arroba)"}),e.jsx(f,{id:"brand-handle",placeholder:"@suamarca",value:r.handle,onChange:s=>l(a=>({...a,handle:s.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Usado automaticamente nos carrosséis e publicações."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Foto de perfil"}),e.jsxs("div",{className:"flex items-center gap-4",children:[r.profile_photo_url?e.jsx("img",{src:r.profile_photo_url,alt:"Perfil",className:"h-14 w-14 roun
16ded-full object-cover border border-border"}):e.jsx("div",{className:"h-14 w-14 rounded-full bg-muted flex items-center justify-center",children:e.jsx(Q,{className:"h-6 w-6 text-muted-foreground"})}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"cursor-pointer",children:[e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:async s=>{var q;const a=(q=s.target.files)==null?void 0:q[0];if(!a||!u)return;x(!0);const t=a.name.split(".").pop(),m=`${u}/brands/pfp_${crypto.randomUUID()}.${t}`,{error:C}=await g.storage.from("social-media").upload(m,a);if(C){n.error("Erro no upload"),x(!1);return}const{data:F}=g.storage.from("social-media").getPublicUrl(m);l($=>({...$,profile_photo_url:F.publicUrl})),x(!1),n.success("Foto enviada!")}}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-border hover:bg-accent text-sm",children:[w?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(ae,{className:"h-4 w-4"}),w?"Enviando...":"Upload"]})]}),e.jsx(re,{defaultQuery:r.industry||r.name||"retrato profissional",suggestions:[r.industry,"retrato","equipe","negócios","criativo"].filter(Boolean),orientation:"squarish",onPick:s=>l(a=>({...a,profile_photo_url:s}))}),r.profile_photo_url&&e.jsx(h,{variant:"ghost",size:"sm",className:"text-xs text-destructive",onClick:()=>l(s=>({...s,profile_photo_url:""})),children:"Remover"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Logo da marca"}),e.jsxs("div",{className:"flex items-center gap-4",children:[r.logo_url?e.jsx("img",{src:r.logo_url,alt:"Logo",className:"h-16 w-16 rounded-xl object-cover border border-border"}):e.jsx("div",{className:"h-16 w-16 rounded-xl bg-muted flex items-center justify-center",children:e.jsx(T,{className:"h-8 w-8 text-muted-foreground"})}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"cursor-pointer",children:[e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:xe}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-border hover:bg-accent text-sm",children:[w?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(ae,{className:"h-4 w-4"}),w?"Enviando...":"Upload"]})]}),e.jsx(re,{defaultQuery:r.industry||r.name||"logotipo minimalista",suggestions:[r.industry,"ícone","símbolo","abstrato","minimalista"].filter(Boolean),orientation:"squarish",label:"Banco de imagens",onPick:s=>l(a=>({...a,logo_url:s}))}),r.logo_url&&e.jsx(h,{variant:"ghost",size:"sm",className:"text-xs text-destructive",onClick:()=>l(s=>({...s,logo_url:""})),children:"Remover"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(De,{className:"h-4 w-4"})," Cores da marca (até 6)"]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[r.colors.map((s,a)=>e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("input",{type:"color",value:s,onChange:t=>pe(a,t.target.value),className:"h-10 w-10 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s}),e.jsx("button",{type:"button",onClick:()=>ve(a),className:"text-xs text-muted-foreground hover:text-destructive",children:"×"})]})]},a)),r.colors.length<6&&e.jsxs(h,{type:"button",variant:"outline",size:"sm",onClick:ge,children:[e.jsx(M,{className:"mr-1 h-3 w-3"})," Cor"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(se,{className:"h-4 w-4"})," Website"]}),e.jsx(f,{placeholder:"https://seusite.com.br",value:r.website,onChange:s=>l(a=>({...a,website:s.target.value}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Redes Sociais"}),e.jsx("div",{className:"space-y-2",children:Object.entries(J).map(([s,a])=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a,{className:"h-4 w-4 text-muted-foreground shrink-0"}),e.jsx(f,{placeholder:`@${s} ou URL`,value:r.social_links[s]||"",onChange:t=>je(s,t.target.value),className:"h-9"})]},s))})]})]}
16),e.jsxs(U,{value:"content",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Palavras-chave da marca"}),e.jsx(f,{placeholder:"Separadas por vírgula",value:r.keywords.join(", "),onChange:s=>l(a=>({...a,keywords:s.target.value.split(",").map(t=>t.trim()).filter(Boolean)}))}),r.keywords.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1",children:r.keywords.map((s,a)=>e.jsx(P,{variant:"secondary",className:"text-xs",children:s},a))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Palavras a evitar"}),e.jsx(f,{placeholder:"Separadas por vírgula",value:r.avoid_words.join(", "),onChange:s=>l(a=>({...a,avoid_words:s.target.value.split(",").map(t=>t.trim()).filter(Boolean)}))}),r.avoid_words.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1",children:r.avoid_words.map((s,a)=>e.jsx(P,{variant:"destructive",className:"text-xs",children:s},a))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Exemplos de posts"}),e.jsx(B,{placeholder:"Cole 2-3 posts que representam sua marca, um por linha",value:r.example_posts.join(`
17`),onChange:s=>l(a=>({...a,example_posts:s.target.value.split(`
18`).filter(Boolean)})),rows:4})]})]}),e.jsx(U,{value:"advanced",className:"space-y-4 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:"Prompt personalizado para IA"}),e.jsx(B,{placeholder:"Instruções avançadas para a IA quando gerar conteúdo desta marca...",value:r.system_prompt,onChange:s=>l(a=>({...a,system_prompt:s.target.value})),rows:6}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Este prompt será enviado junto com cada geração de conteúdo para personalizar o comportamento da IA."})]})})]}),e.jsxs(Oe,{children:[e.jsx(h,{variant:"outline",onClick:()=>v(!1),children:"Cancelar"}),e.jsxs(h,{className:"bg-gradient-to-r from-violet-600 to-fuchsia-500",onClick:de,disabled:!r.name.trim()||E,children:[E?e.jsx(y,{className:"mr-2 h-4 w-4 animate-spin"}):null,b?"Salvar Alterações":"Criar Perfil"]})]})]})})]})}export{Ye 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.