1import{j as e}from"./jsx-runtime-BPuU0P6P.js";import{r as s}from"./entry-prerender-BMuo7flL.js";import{A as D}from"./AdminLayout-CAe-BxqH.js";import{an as q,s as l,by as p,L as j,av as z,az as E,bo as A,aw as M,ax as B,ay as J,B as g,bl as h,aq as k,br as G,bt as Q,bu as V,bv as Y,bF as H,bm as K}from"./TrainingChatbotAssistito-Dw7wZTEO.js";import{T as W}from"./textarea-CxFeWz7X.js";import{P as X}from"./pencil-68tooVUq.js";import"./index-DCAoOXNF.js";import"./index-B5GLwUUz.js";import"./index-flQR6vjt.js";import"./index-DPahXmup.js";import"./tooltip-BQs6FoVd.js";import"./QueryClientProvider-DOcgVHLZ.js";import"./index.esm-BuQzC2GO.js";import"./log-out-DvcRHCaE.js";import"./upload-BxB6zjRD.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 Z=q("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),$={brand:{name:"Smartypilot",claim:"Smarter Search, More sales.",positioning:["suite AI per e-commerce","smart","semplice","fresca","competitiva","utile","in evoluzione","accessibile","affidabile"]},products:{search_ai:["ricerca semantica","meno zero result","risultati rilevanti","merchandising intelligente","analytics di ricerca","ricerca veloce"],chatbot_ai:["assistenza 24/7","customer care automatico","tracking ordini","personal shopper","riduzione ticket","automazioni"],product_qa_ai:["domande e risposte in scheda prodotto","riduzione dubbi pre-acquisto","risposte basate su dati reali","AI anche sulle immagini","supporto alla conversione","SEO FAQPage"]},targets:{ceo:["ROI","crescita","vantaggio competitivo","semplicita","time-to-value"],ecommerce_manager:["conversioni","controllo catalogo","merchandising","zero result","ottimizzazione"],marketing_manager:["insight","GA4","SEO","segmentazione","performance marketing"],developer:["integrazione rapida","API","connettori","staging","documentazione"],agency:["soluzione da proporre ai clienti","vantaggio competitivo","ricorrenza","supporto","facilita di adozione"],all:["merchant","team e-commerce","marketer","developer","partner"]},tone_of_voice:{direct:"diretto, chiaro, concreto",smart:"smart, giovane, fresco, mai infantile",consultative:"consulenziale, competente, utile",energetic:"dinamico, positivo, mai aggressivo",technical_light:"tecnico ma semplice"},global_rules:{max_emojis:0,max_hashtags:0,min_chars:550,max_chars:750,prefer_short_paragraphs:!0,one_main_message_only:!0,always_be_concrete:!0,avoid_empty_hype:!0,avoid_corporate_jargon:!0,avoid_overpromising:!0,avoid_aggressive_sales_tone:!0,avoid_feature_dump:!0,soft_cta_only:!0,sound_human:!0,sound_modern:!0,sound_useful:!0},approved_proof:["made in Italy","supporto in italiano","integrazione con Shopify, Magento 2, WooCommerce, PrestaShop, NopCommerce e custom/headless","integrazione GA4","automazioni con n8n","prova gratuita di 30 giorni","pricing basato su utilizzo reale","G2 rating 4.7/5","caso Maury's: +50% conversione utenti search, -45% ticket, +10% valore medio ordine e numero ordini"],post_types:{educational:"spiega un problema o una dinamica dell'e-commerce e mostra come affrontarla",pain_solution:"parte da un problema reale e porta alla soluzione",feature_focus:"mette in luce una funzione concreta con beneficio pratico",benefit_focus:"mette in luce il valore finale per il target",case_study:"usa un caso reale o una prova concreta",myth_busting:"smonta un falso mito sul mondo AI o e-commerce",comparison:"contrappone approccio vecchio e approccio con Smartypilot",engagement:"stimola commenti con una domanda o una presa di posizione",brand_image:"rafforza immagine, filosofia e visione del prodotto"},structures:{s1:"hook + problema + soluzione + CTA",s2:"scenario + errore comune + soluzione con Smartypilot + CTA",s3:"funzionalita + beneficio + esempio + CTA",s4:"domanda iniziale + riflessione + risposta + CTA",s5:"insight + perche conta + come ti aiuta Smartypilot + CTA",s6:"caso reale + risultato + takeaway + CTA"},topic_rules:{search_ai:"parla di ricerca intelligente, risultati rilevanti, zero result, merchandising, analytics, esperienza utente",chatbot_ai:"parla di assistenza 24/7, customer care, personal shopper, ordini, riduzione ticket, automazioni",product_qa_ai:"parla di dubbi pre-acquisto, scheda prodotto, domande intelligenti, chiarezza, conversione, SEO",integration:"parla di connettori, API, piattaforme supportate, facilita tecnica, tempo di attivazione",proof:"parla di casi studio, risultati, rating, affidabilita, supporto, concretezza",brand:"parla di visione, approccio smart, semplicita, freschezza, utilita reale",innovation:"parla di AI utile, e-commerce moderno, evoluzione continua, c
6ompetitivita"},month_day_matrix:{1:{type:"educational",target:"ceo",tone:"consultative",structure:"s1",topic:"search_ai"},2:{type:"pain_solution",target:"ecommerce_manager",tone:"direct",structure:"s2",topic:"search_ai"},3:{type:"feature_focus",target:"developer",tone:"technical_light",structure:"s3",topic:"integration"},4:{type:"benefit_focus",target:"marketing_manager",tone:"smart",structure:"s5",topic:"search_ai"},5:{type:"myth_busting",target:"ceo",tone:"direct",structure:"s4",topic:"chatbot_ai"},6:{type:"engagement",target:"ecommerce_manager",tone:"smart",structure:"s4",topic:"search_ai"},7:{type:"brand_image",target:"agency",tone:"energetic",structure:"s5",topic:"brand"},8:{type:"case_study",target:"ceo",tone:"consultative",structure:"s6",topic:"proof"},9:{type:"feature_focus",target:"marketing_manager",tone:"smart",structure:"s3",topic:"search_ai"},10:{type:"pain_solution",target:"developer",tone:"technical_light",structure:"s2",topic:"integration"},11:{type:"benefit_focus",target:"ecommerce_manager",tone:"direct",structure:"s1",topic:"chatbot_ai"}
6,12:{type:"engagement",target:"marketing_manager",tone:"smart",structure:"s4",topic:"product_qa_ai"},13:{type:"educational",target:"ceo",tone:"consultative",structure:"s1",topic:"product_qa_ai"},14:{type:"comparison",target:"ecommerce_manager",tone:"direct",structure:"s2",topic:"search_ai"},15:{type:"feature_focus",target:"developer",tone:"technical_light",structure:"s3",topic:"chatbot_ai"},16:{type:"benefit_focus",target:"agency",tone:"energetic",structure:"s1",topic:"integration"},17:{type:"myth_busting",target:"marketing_manager",tone:"smart",structure:"s4",topic:"search_ai"},18:{type:"case_study",target:"ecommerce_manager",tone:"consultative",structure:"s6",topic:"proof"},19:{type:"educational",target:"developer",tone:"technical_light",structure:"s5",topic:"integration"},20:{type:"engagement",target:"ceo",tone:"smart",structure:"s4",topic:"chatbot_ai"},21:{type:"pain_solution",target:"marketing_manager",tone:"direct",structure:"s2",topic:"product_qa_ai"},22:{type:"feature_focus",target:"ecommerce_manager",tone:"smart",structure:"s3",topic:"product_qa_ai"},23:{type:"brand_image",target:"ceo",tone:"energetic",structure:"s5",topic:"brand"}
6,24:{type:"comparison",target:"marketing_manager",tone:"direct",structure:"s2",topic:"search_ai"},25:{type:"benefit_focus",target:"ceo",tone:"consultative",structure:"s1",topic:"integration"},26:{type:"case_study",target:"agency",tone:"consultative",structure:"s6",topic:"proof"},27:{type:"myth_busting",target:"developer",tone:"technical_light",structure:"s4",topic:"chatbot_ai"},28:{type:"educational",target:"marketing_manager",tone:"smart",structure:"s5",topic:"search_ai"},29:{type:"brand_image",target:"ceo",tone:"energetic",structure:"s5",topic:"innovation"},30:{type:"engagement",target:"agency",tone:"smart",structure:"s4",topic:"integration"},31:{type:"brand_image",target:"all",tone:"energetic",structure:"s5",topic:"brand"}},generation_logic:["in base alla data di oggi che ti ho comunicato nel prompt, estrai il giorno del mese","usa la configurazione corrispondente in month_day_matrix","genera un topic sintetico da inviare ad un altro agente che scriverà il post ","usando solo target, tone, structure e topic assegnati a quel giorno.","quando dai consigli o evidenzi problematiche assicurati che possano essere risolte con Smartypilot.","Mantieni un solo messaggio centrale","inserisci massimo un proof point se utile."],output_rules:{format:"plain_text_only",no_meta_text:!0,no_lists:!0,no_explanations:!0,no_prompt_echo:!0}},T=JSON.stringify($,null,2),ee=`STYLE & QUALITY BAR: 7 8Ultra-premium, photorealistic commercial photography for a high-end B2B SaaS e-commerce product. Editorial advertising quality â the kind of image a top-tier design agency would shoot for a Series-B SaaS brand, not a generic stock photo and not a generic AI-generated image. Professional studio or natural window lighting, realistic soft shadows, correct perspective, crisp sharp focus, clean color grading. Output resolution must look native HD/4K quality, pixel-perfect, no compression artifacts, no blur, no grain unless explicitly requested. 9 10STRICT QUALITY CONSTRAINTS (mandatory): 11 12- No uncanny, plastic-looking, or overly symmetrical faces. 13 14- No distorted or extra fingers, hands, limbs, or facial features. 15 16- No garbled, warped, duplicated, or nonsensical objects. 17 18- No misspelled, garbled, or nonsensical text anywhere in the image â every word visible in the UI, button, label, price, or product name must be spelled correctly and typographically clean, even if the requested text is in Italian. 19 20- No watermarks, no borders, no other brand's logo, no third-party trademarks, no copyrighted characters. 21 22- No visible "AI generation" tells: no melted geometry, no inconsistent light sources, no impossible reflections. 23 24- No glow, no neon edges, no glassmorphism/transparent panels, no light beams, no lens flares, no particle/sparkle effects on any UI overlay â UI panels must be flat, opaque, and clean. 25 26- NEVER render the Smartypilot logo, wordmark, app icon, or the word "Smartypilot" anywhere in the image â no title text, no favicon, no brand name visible in any UI element. The interface shown must look like a premium, real e-commerce product UI with no brand identity attached to it. 27 28BRAND IDENTITY â SMARTYPILOT: 29 30This image represents Smartypilot, an AI suite for e-commerce (Made in Italy, Rome-based, B2B SaaS), but the brand itself must stay invisible in the output (see constraint above) â only the visual language (palette, UI style, mood) must be present. The mood is: credible, professional, premium, technical-but-human â never flashy, never "startup hype." Think Stripe / Linear-level visual restraint applied to an e-commerce AI product. 31 32COLOR PALETTE (use exclusively these colors as UI/accent colors â do not invent new brand colors): 33 34- Primary brand green: #92C700 â used for CTAs, active states, highlights, badges, key UI accents. This green must be the single dominant accent color in any interface element shown. 35 36- Backgrounds: pure white #FFFFFF and light neutral gray #F9F9F9 37 38- Soft green-tinted light background: #F5FDEF â used for hero areas or card backgrounds when a tinted surface is needed 39 40- Dark neutral text/UI elements: #262626 and #363636 41 42- Soft light-blue tint (used sparingly, e.g. navigation bar): #F0F8FF 43 44- Borders: light neutral gray, subtle, never black 45 46UI DESIGN LANGUAGE (when a screen/interface overlay is shown): 47 48Modern, clean, minimal e-commerce SaaS interface. Rounded corners (12â16px radiu
48s), soft subtle drop shadows, generous white space, grid-based product card layout. Typography: Poppins or an equivalent clean geometric sans-serif, medium/bold weight for headings, regular weight for body text. Buttons: solid brand green #92C700 with white text, rounded, no gradients, no skeuomorphism. 49 50COMPOSITION RULES: 51 52This is a two-layer composition, not a screen-in-screen shot. 53 54Background layer (context, secondary): a real, natural, credible human figure shown in an environment that contextualizes who they are and where this is happening. The person may be holding or near a device (phone, laptop, tablet), but the device's screen must stay small, out of focus, or angled away from camera â it must NOT display any readable interface, text, or UI. The background photo sets mood and context only; keep it visually secondary (slightly softer focus, less contrast, quieter color) so it does not compete with the foreground. 55 56Foreground layer (protagonist, primary): a single clean UI panel â the interface for the inferred module (see INFERENCE RULES below) â placed as a flat, sharp, fully legible overlay on top of the background photo, occupying the dominant portion of the frame. Treat it like a well-designed product marketing shot (the kind used on SaaS landing pages): a crisp rectangular card/panel with soft rounded corners and a single subtle drop shadow for realistic depth, floating naturally above the photo. Do NOT render it as glowing, holographic, neon-edged, semi-transparent/glassy, or with light beams, particle effects, or lens flares. No glassmorphism, no glow, no floating sparkles. It must read as clean, flat, high-contrast UI â fully readable at first glance, exactly as if screenshotted from a real product and placed in a marketing composition, not as a sci-fi hologram. 57 58The foreground UI panel is what the viewer's eye must go to first. The background photo exists only to answer "who is this for, and where." 59 60TEXT LANGUAGE: 61 62All UI text, labels, product names, and dialogue shown inside the interface must be in Italian, grammatically correct, natural, and realistic for an Italian e-commerce context â never placeholder text like "Lorem ipsum" or "Product 1". 63 64INFERENCE RULES (decide these autonomously â they are not provided as input): 65 661. MODULE â from "message_to_convey" below, infer which of the three product modules this image represents, and let it drive everything else: 67 68 - Ricerca AI â message is about finding the right product, semantic search understanding, "trovare quello che cerco anche se lo descrivo a modo mio". UI panel = search bar with a real Italian query + 2-3 product result cards whose names semantically match the intent (not literal keyword match â show synonym/intent understanding), price in euro, one badge in brand green. 69 70 - Chatbot AI â message is about real-time problem solving, order/shipping help, personal shopping guidance, conversation-driven reassurance. UI panel = a short realistic chat exchange: a specific user message expressing a real need or problem (never "ciao" / "come posso aiutarti"), followed by a specific, useful assistant reply (product recommendation with a green "Aggiungi al carrello" button, order status, or handoff summary). 71 72 - Product Questions AI â message is about resolving a specific doubt before purchase, product-detail confidence. UI panel = a Q&A overlay near a product image with one specific, credible question and one specific, useful answer (never vague, always a concrete detail: measurements, materials, compatibility, etc.). 73 742. HUMAN FIGURE â infer age range, gender, styling, posture, and facial expression that best fit a plausible Italian e-commerce customer for the inferred module and message. Vary these naturally across different generations of this prompt â do not default to the same demographic every time. The expression and posture must visibly embody the message_to_convey (relief, confidence, satisfaction, curiosity resolved, trust) â never neutral or generic. Choose a setting/context (home, outdoor, desk, commuting, etc.) coherent with how a real customer would plausibly be using this in that moment. 75 763. UI CONTENT â write specific, realistic Italian UI copy for the inferred module that concretely dramatizes message_to_convey. Never use generic placeholder copy; every string must sound like it comes from a real Italian e-commerce store.`,te=`Sei un esperto SEO per e-commerce. Dato il titolo e la descrizione sintetica di un articolo blog, genera: 771. Un "seo_title" (max 60 caratteri) ottimizzato per i motori di ricerca, che includa la keyword principale. 782. Una "seo_description" (max 160 caratteri) persuasiva e informativa, che invogli al click dalla SERP. 79 80Rispondi SOLO con JSON valido nel formato: {"seo_title": "...", "seo_description": "..."} 81Non aggiungere testo extra, commenti o markdown.`,ae={blog_hero_image:"Immagine Hero Blog",partner_conditions_parser:"Parser Condizioni Partner",fee_calculator:"Calcolo Fee Partner",seo_generation_prompt:"SEO AI Blog",api_create_post:"API Creazione Articoli",mia_ped_rules:"MIA â PED Rules (JSON)",outreach_primo_contatto:"Prompt per Outreach - Primo contatto",media_generator_base_prompt:"Prompt base â Generatore Immagini Media",email_richiesta_recensioni:"Email richiesta recensioni"},oe={blog_hero_image:[{name:"{post_title}
81",description:"Titolo dell'articolo"},{name:"{post_description}",description:"Estratto/descrizione dell'articolo"},{name:"{additional_directives}",description:"Direttive aggiuntive inserite dall'utente"}],partner_conditions_parser:[{name:"{conditions_text}",description:"Descrizione condizioni in linguaggio naturale"}],fee_calculator:[{name:"{json_pagamento}",description:"Oggetto JSON del pagamento Smartypilot"},{name:"{json_regole}",description:"Array delle regole commissioni dal conditions_json del partner"}],seo_generation_prompt:[{name:"{titolo}",description:"Titolo dell'articolo blog"},{name:"{descrizione}",description:"Estratto/descrizione sintetica dell'articolo"}],api_create_post:[{name:"{autori_json}",description:"JSON degli autori disponibili (id, name, bio)"},{name:"{categorie_json}",description:"JSON delle categorie disponibili (id, name)"},{name:"{tag_json}",description:"JSON dei tag disponibili (id, name)"}],outreach_primo_contatto:[{name:"{{JSON_LEAD}}",description:'Oggetto JSON completo del lead (formato esportato dal tasto "Copia JSON" nella scheda lead)'}],email_richiesta_recensioni:[{name:"{{nome}}",description:"Nome e cognome del destinatario"},{name:"{{ragione_sociale}}",description:"Ragione sociale del cliente"},{name:"{{sito_web}}",description:"Sito web del cliente"},{name:"{{servizi}}",description:"Elenco servizi attivi (Chatbot, Ricerca, Product Questions)"},{name:"{{note}}",description:"Note libere inserite nel form"},{name:"{{ai_hints}}",description:"Indicazioni aggiuntive per la generazione AI"}]};function be(){const[f,O]=s.useState([]),[C,y]=s.useState(!0),[b,_]=s.useState(!1),[P,m]=s.useState(!1),[o,U]=s.useState(null),[c,d]=s.useState({description:"",prompt_template:""});s.useEffect(()=>{v()},[]);const v=async()=>{y(!0);try{const{data:t,error:a}=await l.from("prompts").select("*").order("name");if(a)throw a;const{data:r,error:S}=await l.from("app_settings").select("value, updated_at").eq("key","seo_generation_prompt").maybeSingle();if(S)throw S;const u=(t||[]).map(L=>({...L,_source:"prompts"}));u.push({id:"seo_generation_prompt",name:"seo_generation_prompt",description:"Prompt per la generazione automatica dei dati SEO degli articoli blog tramite AI",prompt_template:(r==null?void 0:r.value)||te,created_at:(r==null?void 0:r.updated_at)||new Date().toISOString(),updated_at:(r==null?void 0:r.updated_at)||new Date().toISOString(),_source:"app_settings"});const{data:i,error:N}=await l.from("app_settings").select("value, updated_at").eq("key","mia_ped_rules").maybeSingle();if(N)throw N;u.push({id:"mia_ped_rules",name:"mia_ped_rules",description:"Regole del Piano Editoriale Digitale per Agent MIA (modalità PED Rules). JSON con brand, prodotti, target, tone, matrice giorno/mese.",prompt_template:(i==null?void 0:i.value)||T,created_at:(i==null?void 0:i.updated_at)||new Date().toISOString(),updated_at:(i==null?void 0:i.updated_at)||new Date().toISOString(),_source:"app_settings"});const{data:n,error:I}=await l.from("app_settings").select("value, updated_at").eq("key","media_generator_base_prompt").maybeSingle();if(I)throw I;u.push({id:"media_generator_base_prompt",name:"media_generator_base_prompt",description:"Prompt fisso concatenato prima di message_to_convey e aspect_ratio nel generatore immagini (/admin/media/genera).",prompt_template:(n==null?void 0:n.value)||ee,created_at:(n==null?void 0:n.updated_at)||new Date().toISOString(),updated_at:(n==null?void 0:n.updated_at)||new Date().toISOString(),_source:"app_settings"}),O(u)}catch(t){console.error("Error fetching prompts:",t),p.error("Errore nel caricamento dei prompts")}finally{y(!1)}},R=t=>{U(t),d({description:t.description||"",prompt_template:t.prompt_template}),m(!0)},F=async t=>{if(t.preventDefault(),!!o){_(!0);try{if(o._source==="app_settings"){if(o.name==="mia_ped_rules")try{JSON.parse(c.prompt_template)}catch(r){p.error("JSON non valido: "+(r instanceof Error?r.message:"errore di parsing")),_(!1);return}const{error:a}=await l.from("app_settings").upsert([{key:o.name,value:c.prompt_template,updated_at:new Date().toISOString()}],{onConflict:"key"});if(a)throw a}else{const{error:a}=await l.from("prompts").update({description:c.description||null,prompt_template:c.prompt_template,updated_at:new Date().toISOString()}
81).eq("id",o.id);if(a)throw a}p.success("Prompt aggiornato!"),m(!1),v()}catch(a){console.error("Error saving prompt:",a),p.error("Errore nel salvataggio")}finally{_(!1)}}},x=t=>ae[t]||t.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase()),w=t=>oe[t]||[];return e.jsxs(D,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Gestione Prompts"}),e.jsx("p",{className:"text-muted-foreground",children:"Personalizza i prompts utilizzati per la generazione AI"})]}),C?e.jsx("div",{className:"flex items-center justify-center h-48",children:e.jsx(j,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):f.length===0?e.jsx(z,{children:e.jsxs(E,{className:"flex flex-col items-center justify-center h-48 text-muted-foreground",children:[e.jsx(A,{className:"h-12 w-12 mb-4"}),e.jsx("p",{children:"Nessun prompt configurato"})]})}):e.jsx("div",{className:"grid gap-4",children:f.map(t=>e.jsxs(z,{children:[e.jsx(M,{className:"pb-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(B,{className:"text-lg flex items-center gap-2",children:[e.jsx(A,{className:"h-5 w-5 text-primary"}),x(t.name)]}),t.description&&e.jsx(J,{children:t.description})]}),e.jsxs(g,{variant:"outline",size:"sm",onClick:()=>R(t),children:[e.jsx(X,{className:"h-4 w-4 mr-2"}),"Modifica"]})]})}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:"Variabili disponibili"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:w(t.name).map(a=>e.jsx(k,{variant:"secondary",className:"text-xs",children:a.name},a.name))})]}),e.jsxs("div",{children:[e.jsx(h,{className:"text-xs text-muted-foreground",children:"Anteprima prompt"}),e.jsxs("pre",{className:"mt-1 p-3 bg-muted rounded-md text-xs max-h-24 overflow-hidden whitespace-pre-wrap break-words",children:[t.prompt_template.substring(0,300),"..."]})]})]})})]},t.id))})]}),e.jsx(G,{open:P,onOpenChange:m,children:e.jsxs(Q,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsx(V,{children:e.jsxs(Y,{children:["Modifica Prompt: ",o&&x(o.name)]})}),e.jsxs("form",{onSubmit:F,className:"space-y-6",children:[o&&e.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[e.jsx(H,{className:"h-4 w-4 text-primary"}),"Variabili disponibili"]}),e.jsx("div",{className:"grid gap-2",children:w(o.name).map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(k,{variant:"outline",className:"font-mono",children:t.name}),e.jsx("span",{className:"text-muted-foreground",children:t.description})]},t.name))})]}),(o==null?void 0:o._source)!=="app_settings"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"description",children:"Descrizione"}),e.jsx(K,{id:"description",value:c.description,onChange:t=>d(a=>({...a,description:t.target.value})),placeholder:"Descrizione del prompt..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"prompt_template",children:"Template Prompt"}),e.jsx(W,{id:"prompt_template",value:c.prompt_template,onChange:t=>d(a=>({...a,prompt_template:t.target.value})),placeholder:"Inserisci il template del prompt...",rows:20,className:"font-mono text-sm",required:!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Usa le variabili sopra indicate per inserire dinamicamente i dati."})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(o==null?void 0:o.name)==="mia_ped_rules"&&e.jsxs(g,{type:"button",variant:"outline",onClick:()=>{d(t=>({...t,prompt_template:T})),p.info(`JSON di default caricato nell'editor. Premi "Salva modifiche" per confermare.`)},className:"mr-auto",children:[e.jsx(Z,{className:"h-4 w-4 mr-2"}),"Ripristina default"]}),e.jsx(g,{type:"button",variant:"outline",onClick:()=>m(!1),children:"Annulla"}),e.jsxs(g,{type:"submit",disabled:b,children:[b&&e.jsx(j,{className:"h-4 w-4 mr-2 animate-spin"}),"Salva modifiche"]})]})]})]})})]})}export{be 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.