1import{j as e}from"./radix-7KI6mJPD.js";import{r as A}from"./highcharts-DAm76Z6K.js";import{D as ce,k as de,l as pe,m as me,bk as ue,n as he,L as ee,J as ye,K as ge,N as fe,O as xe,Q as we,bB as ve,aM as ke,aJ as re,a as te,b as je,by as se,cI as be,H as z,bl as ie,S as J,B as F,X as _e,aY as Ne,e as Ce,Z as Ae,o as ze,p as Pe,v as L,s as X}from"./index-BbUi1KSl.js";import{l as ne}from"./index-BKC4gVPG.js";import{u as Ie}from"./tanstack-B2cSsH6e.js";var Se=Object.defineProperty,Ee=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,oe=(s,r,i)=>r in s?Se(s,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[r]=i,V=(s,r)=>{for(var i in r||(r={}))Re.call(r,i)&&oe(s,i,r[i]);if(ae)for(var i of ae(r))Oe.call(r,i)&&oe(s,i,r[i]);return s},U=(s,r)=>Ee(s,Te(r));const $e={"ð":{keywords:["ceo","executive","president","chairman","leider"],priority:10},"ð¼":{keywords:["business","zakenman","ondernemer","entrepreneur"],priority:5},"ð¢":{keywords:["corporate","company","bedrijf"],priority:3},"ð»":{keywords:["software","developer","programmer","code","tech"],priority:8},"ð¤":{keywords:["ai","artificial intelligence","machine learning","robot","automation"],priority:9},"ð¬":{keywords:["scientist","researcher","research","wetenschapper","onderzoek"],priority:8},"ð§¬":{keywords:["biotech","genetics","dna","biology","biologie","genomic"],priority:9},"ð":{keywords:["pharma","pharmaceutical","medicine","drug","vaccine","farma"],priority:9},"âï¸":{keywords:["chemistry","chemical","chemist","chemie"],priority:8},"ð":{keywords:["astronomy","space","ruimte","nasa","astronaut"],priority:8},"âï¸":{keywords:["physics","quantum","nuclear","fysica","atoom"],priority:8},"ð§ ":{keywords:["neuroscience","brain","psychology","neurologie","hersenen"],priority:8},"ð¨ââï¸":{keywords:["doctor","physician","surgeon","medical","arts","chirurg"],priority:9},"ð":{keywords:["vaccine","injection","vaccinatie","immunology"],priority:7},"ð¥":{keywords:["hospital","healthcare","clinic","ziekenhuis","kliniek"],priority:6},"ð¨âð³":{keywords:["chef","cook","culinary","kitchen","kok","culinair","restaurant"],priority:9},"ð":{keywords:["pizza","italian","food delivery"],priority:7},"â":{keywords:["coffee","koffie","starbucks","cafe","barista"],priority:8},"ð":{keywords:["burger","fast food","mcdonalds","restaurant"],priority:7},"ð±":{keywords:["vegan","plant-based","organic","biologisch","vegetarian"],priority:8},"ð¥":{keywords:["healthy","salad","nutrition","voeding","gezond"],priority:6},"ð·":{keywords:["wine","wijn","sommelier","vineyard"],priority:7},"ðº":{keywords:["beer","brewery","bier","brouwerij"],priority:7},"â½":{keywords:["voetbal","soccer","football","messi","ronaldo"],priority:9},"ð¾":{keywords:["tennis","federer","nadal","serena","wimbledon"],priority:9},"ð":{keywords:["basketball","nba","lebron","jordan"],priority:9},"ðï¸":{keywords:["formula","racing","f1","hamilton","verstappen"],priority:9},"ð":{keywords:["swimming","zwemmen","phelps","olympic swim"],priority:8},"ð":{keywords:["running","sprint","bolt","marathon","athletics"],priority:7},"ð¤¸":{keywords:["gymnastics","gymnast","biles","turnen"],priority:8},"ð":{keywords:["american football","nfl","superbowl"],priority:8},"â·ï¸":{keywords:["ski","snowboard","winter sport"],priority:7},"ð":{keywords:["champion","winner","kampioen","gold medal"],priority:6},"ð¬":{keywords:["film","movie","director","cinema","hollywood","regisseur"],priority:8},"ð":{keywords:["actor","actress","theater","drama","acteur","actrice"],priority:8},"ð¤":{keywords:["singer","vocalist","zanger","music","concert"],priority:8},"ðµ":{keywords:["musician","composer","music","muziek","componist"],priority:7},"ð¸":{keywords:["guitar","rock","band","gitaar"],priority:7},"ð¹":{keywords:["piano","pianist","classical","klassiek"],priority:7},"ðº":{keywords:["television","tv","broadcast","show","presenter"],priority:6},"ð»":{keywords:["radio","podcast","host"],priority:6},"âï¸":{keywords:["writer","author","schrijver","auteur","novelist"],priority:8},"ð":{keywords:["copywriter","content","blogger","journalist"],priority:7},"ð°":{keywords:["news","journalism","reporter","nieuws"],priority:7},"ð":{keywords:["book","publisher","editor","boek","uitgever"],priority:6},"ðï¸":{keywords:["speaker","keynote","motivational","spreker"],priority:7}
1,"ð£":{keywords:["marketing","advertising","campaign","reclame"],priority:7},"ð¯":{keywords:["target","strategy","strategist","strategie"],priority:6},"ð":{keywords:["growth","sales","revenue","groei","verkoop"],priority:6},"ð":{keywords:["retail","ecommerce","shopping","winkel"],priority:6},"ð°":{keywords:["investor","venture","capital","investeerder","kapitaal"],priority:7},"ð":{keywords:["analyst","finance","financial","analist","financieel"],priority:6},"ð¦":{keywords:["bank","banking","bankier"],priority:6},"ð":{keywords:["luxury","premium","exclusive","luxe"],priority:5},"ð¡":{keywords:["inventor","innovator","uitvinder","innovation","patent"],priority:8},"ð":{keywords:["startup","disruptor","pioneer","pionier","launch"],priority:7},"â¡":{keywords:["energy","electric","power","energie","elektrisch","tesla"],priority:7},"ð":{keywords:["battery","sustainable","renewable","duurzaam"],priority:6},"ð":{keywords:["activist","climate","environmental","global","klimaat"],priority:7},"â":{keywords:["rights","justice","equality","activist","rechten"],priority:7},"ðï¸":{keywords:["peace","nobel","humanitarian","vrede"],priority:7},"ðï¸":{keywords:["politics","government","president","minister","politiek"],priority:6},"ð¨":{keywords:["artist","painter","designer","kunstenaar","ontwerper"],priority:7},"ð¸":{keywords:["photographer","photo","fotograaf","fotografie"],priority:7},"ðï¸":{keywords:["architect","construction","builder","bouw"],priority:6},"âï¸":{keywords:["lawyer","legal","attorney","advocaat","juridisch"],priority:6},"ð§":{keywords:["wellness","yoga","meditation","mindfulness","zen"],priority:6},"ð®":{keywords:["gaming","esports","game","gamer","twitch"],priority:7},"ð":{keywords:["ocean","marine","oceaan","zee","diving"],priority:6}},De={Technology:["tech","software","ai","digital","app","platform","data","cyber"],Farmaceutisch:["pharma","farma","vaccine","drug","medicine","medicijn","geneesmiddel"],Biotechnologie:["biotech","genetics","genomic","dna","biologisch","mrna"],Voedingsmiddelen:["food","voeding","restaurant","culinair","snack","drink","drank"],Sport:["sport","atleet","athlete","voetbal","tennis","racing","olymp"],Entertainment:["film","music","muziek","actor","singer","entertainment","media"],Marketing:["marketing","advertising","brand","copywriting","reclame"],Finance:["finance","investment","bank","capital","venture","fintech"],Healthcare:["health","medical","hospital","doctor","zorg","gezondheid"],Wetenschap:["science","research","wetenschap","onderzoek","professor","nobel"],Energie:["energy","solar","renewable","oil","gas","energie","duurzaam"]};function Ze(s,r,i){const l=`${s} ${r} ${i||""}`.toLowerCase(),g=[];for(const[x,d]of Object.entries($e)){const f=d.keywords.filter(p=>l.includes(p)).length;f>0&&g.push({emoji:x,priority:d.priority,matchCount:f})}return g.length>0?(g.sort((x,d)=>d.matchCount*10+d.priority-(x.matchCount*10+x.priority)),g[0].emoji):"â"}function Be(s){const r=s.toLowerCase();for(const[i,l]of Object.entries(De))if(l.some(g=>r.includes(g)))return i;return""}function Fe(s){if(!s)return[];try{const r=new DOMParser().parseFromString(s,"text/html");return Array.from(r.body.querySelectorAll("h1,h2,h3,h4,p,li")).map(l=>(l.textContent||"").replace(/\s+/g," ").trim()).filter(Boolean)}catch(r){return s.replace(/<[^>]+>/g,` 2`).split(` 3`).map(i=>i.replace(/\s+/g," ").trim()).filter(Boolean)}}function le(s){var r;const i=[],g=s.replace(/\r\n?/g,` 4`).replace(/[\u2028\u2029]/g,` 5`).replace(/\u00A0/g," ").replace(/\f/g,` 6`).split(` 7`).map(n=>n.trim());let x="",d=null,f=[],p="";const K=[/^(?:Inhoudsopgave|INHOUDSOPGAVE|Page \d+|Images from page|parsed-documents|### Images|## Page|NO_CONTENT_HERE|Document parsed from)/i,/^#{1,3}\s*$/,/^`.*`$/,/^\d+\.\s*$/],M=/^#?\s*(?:ð|ð|ð¬|ð¤|ð¨âð³|â½|ð¬|âï¸|ð¼|ð|ð±|ð¨|ð¸|ð§|ð®|ðª|ðï¸|ð|ð|ð¢)\s*(.+)$/,Z=/^(?:[-â¢*]\s*)?(.+?)\s+[-ââ]\s+(.+)$/,B=/^(?:#\s+)?([A-ZÃ-ÃÃ-Ãa-zà -öø-ÿÄ-žá¸-ỿ][A-Za-zÃ-ÃÃ-öø-ÿÄ-žá¸-ỿ'.\-]+(?:\s+(?:&\s+)?(?:van\s+(?:den?\s+|der?\s+)?|de\s+|der\s+|d')?[A-ZÃ-ÃÃ-Ãa-zà -öø-ÿÄ-žá¸-ỿ][A-Za-z
7Ã-ÃÃ-öø-ÿÄ-žá¸-ỿ'.\-]+){0,7})$/i,T=/^([A-ZÃ-ÃÃ-Ãa-zà -öø-ÿÄ-žá¸-ỿ][A-Za-zÃ-ÃÃ-öø-ÿÄ-žá¸-ỿ'.\-]+(?:\s+(?:&\s+)?(?:van\s+(?:den?\s+|der?\s+)?|de\s+|der\s+|d')?[A-ZÃ-ÃÃ-Ãa-zà -öø-ÿÄ-žá¸-ỿ][A-Za-zÃ-ÃÃ-öø-ÿÄ-žá¸-ỿ'.\-]+){0,7})\s+([A-ZÃ-ÃÃ-Ã0-9][A-ZÃ-ÃÃ-Ã0-9\s&]+(?:\s*\/\s*[A-ZÃ-ÃÃ-Ã0-9\s&]+)?)$/,S=/^([A-ZÃ-ÃÃ-Ã0-9][A-ZÃ-ÃÃ-Ã0-9\s&]+(?:\s*\/\s*[A-ZÃ-ÃÃ-Ã0-9\s&]+)?)$/,W=/^#\s+([A-ZÃ-ÃÃ-Ã0-9][A-ZÃ-ÃÃ-Ã0-9\s&\/]+)$/,I=[/ð¤\s*(?:AI-Tip|AI Tip)[:\s]+(.+?)(?=(?:ð¤|$))/gi,/(?:Gebruik(?:ers?)?\s*voor|Ideaal\s*voor|Perfect\s*voor|Top\s*voor|Geschikt\s*voor|Relevant\s*voor)[:\s]+(.+?)(?=(?:Gebruik|Ideaal|Perfect|Top|Geschikt|Relevant|$))/gi],R=()=>{if(!(d!=null&&d.display_name)){d=null,f=[],p="";return}let n=f.join(" ").trim();const m=[];for(const y of I){let b;for(y.lastIndex=0;(b=y.exec(n))!==null;)m.push(b[1].trim())}n=n.replace(/Gebruik(?:ers?)?\s*voor[:\s]+.*/gi,"").replace(/\s+/g," ").trim();let v="",k="";if(p){const y=p.match(/^(.+?)\s*\/\s*(.+)$/);y?(v=G(y[1].trim()),k=G(y[2].trim())):k=G(p)}const E=`${x} ${n} ${p}`,O=Be(E),a={id:crypto.randomUUID(),display_name:d.display_name,description:n||"",expertise_area:v||x,specialization:k,industry:O,years_experience:Le(n),prompt_instruction:m.join(" "),icon_emoji:Ze(d.display_name,n,p),selected:!0,isEnriched:!1};q(a.display_name)&&i.push(a),d=null,f=[],p=""},_=(n,m,v)=>{R(),d={display_name:n.trim()},p=(m||"").trim(),f=[],v&&f.push(v.trim())};for(let n=0;n<g.length;n++){const m=g[n];if(!m||K.some(a=>a.test(m)))continue;const v=m.match(M);if(v){x=G(v[1].replace(/[#\(\)]/g,"").trim());continue}const k=m.match(Z);if(k){const a=k[1].replace(/^#\s+/,"").trim(),y=k[2].trim();if(q(a)){_(a,"",y),R();continue}}const E=m.match(T);if(E){const a=E[1].trim(),y=E[2].trim();if(q(a)){_(a,y);continue}}const O=m.match(B);if(O){const a=O[1].trim();if(q(a)){_(a);for(let y=1;y<=4&&n+y<g.length;y++){const b=(r=g[n+y])==null?void 0:r.trim();if(!b)continue;const $=b.match(S)||b.match(W);if($){p=$[1].trim(),n+=y;break}if(B.test(b)||b.length>140)break}continue}}if(d&&!p){const a=m.match(S)||m.match(W);if(a&&a[1].length<60){p=a[1].trim();continue}}if(d){const a=m.replace(/^#\s+/,"").replace(/\*\*/g,"").replace(/&/g,"&").replace(/\s+/g," ").trim();a&&a.length>2&&f.push(a)}}return R(),i.filter((n,m,v)=>m===v.findIndex(k=>k.display_name.toLowerCase().replace(/\s+/g,"")===n.display_name.toLowerCase().replace(/\s+/g,""))).sort((n,m)=>n.display_name.localeCompare(m.display_name))}function q(s){if(!s)return!1;const r=s.trim().replace(/^#\s+/,"").replace(/^[-â¢*]\s+/,"").trim();if(r.length<2||r.length>80||[/^[\d\.\s]+$/,/^(Inhoudsopgave|Page|Images|Section|Categorie|Atleten en hun Kenmerken)/i,/^[A-Z]\.[\s]/].some(d=>d.test(r)))return!1;const l=r.replace(/\s*["ââ][^"ââ]+["ââ]\s*/g," ").replace(/\s*\([^\)]*\)\s*/g," ").replace(/\s+/g," ").trim();return!(l&&l===l.toUpperCase()||!(/[A-ZÃ-ÃÃ-ÃÄ-Žá¸-Ỿ][a-zà -öø-ÿÄ-žá¸-ỿ]/.test(l)||/[A-ZÃ-ÃÃ-ÃÄ-Žá¸-Ỿ][a-zà -öø-ÿÄ-žá¸-ỿ]/.test(r))||(l?l.split(/\s+/).length:r.split(/\s+/).length)>8)}function G(s){return s.toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function Le(s){const r=s.toLowerCase(),i=s.match(/(\d+)\s*(?:jaar|years?|decades?)/i);if(i){const l=parseInt(i[1]);return i[0].includes("decade")?l*10:l}return r.includes("pioneer")||r.includes("pionier")||r.includes("founder")||r.includes("oprichter")||r.includes("legend")||r.includes("goat")||r.includes("greatest")?25:r.includes("ceo")||r.includes("president")||r.includes("professor")||r.includes("nobel")?20:r.includes("expert")||r.includes("senior")||r.includes("director")||r.includes("master")?15:12}function Y(s){const r=s.description&&s.description.length>50,i=!!s.expertise_area,l=s.prompt_instruction&&s.prompt_instruction.length>50;return!r||!i||!l}function qe({open:s,onOpenChange:r,categories:i}){const[l,g]=A.useState(null),[x,d]=A.useState(""),[f,p]=A.useState([]),[K,M]=A.useState(!1),[Z,B]=A.useState(!1),[T,S]=A.useState(!1),[W,I]=A.useState(0),[R,_]=A.useState(null),[N,n]=A.useState(!0),m=Ie(),v=A.useCallback(async t=>{var u;const o=(u=t.target.files)==null?void 0:u[0];if(!o)return;if(!["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","text/plain"].includes(o.type)&&!o.name.endsWith(".docx")&&!o.name.endsWith(".doc")&&!o.name.endsWith(".txt")){_("Alleen Word documenten (.docx, .doc) of tekst bestanden (.txt) zijn toegestaan");return}g(o),_(null),M(!0);try{let h="";if(o.name.endsWith(".txt")||o.type==="text/plain")h=await o.text();else{const j=await o.arrayBuffer();h=(await ne.extractRawText({arrayBuffer:j})).value||""}let w=le(h);if(w.length<150&&!(o.name.endsWith(".txt")||o.type==="text/plain")){const j=await o.arrayBuffer(),C=await ne.convertToHtml({arrayBuffer:j}),c=Fe(C.value||"");w=le(c.join(` 8`))}w.length===0?_("Geen rollen gevonden in het document. Probeer een andere export (of plak de tekst als .txt)."):p(w)}catch(h){_("Fout bij het lezen van het document. Probeer een ander bestand.")}finally{M(!1)}},[]),k=t=>{p(u=>u.map(o=>o.id===t?U(V({},o),{selected:!o.selected}):o))},E=()=>{p(t=>t.map(u=>U(V({},u),{selected:!0})))},O=()=>{p(t=>t.map(u=>U(V({},u),{selected:!1})))},a=async t=>{var u,o,D;const h=((u=i.find(w=>w.id===x))==null?void 0:u.name)||"professional";try{const{data:w}=await X.auth.getSession();if(!((o=w==null?void 0:w.session)!=null&&o.access_token))throw new Error("Not authenticated");const j=await X.functions.invoke("enrich-imported-roles",{body:{roles:t.map(c=>({display_name:c.display_name,description:c.description,expertise_area:c.expertise_area,specialization:c.specialization,industry:c.industry,years_experience:c.years_experience,prompt_instruction:c.prompt_instruction,icon_emoji:c.icon_emoji})),categoryName:h,language:"nl"}});if(j.error)throw new Error(j.error.message||"Failed to enrich roles");const C=((D=j.data)==null?void 0:D.roles)||[];return t.map((c,Q)=>{const P=C[Q]||{};return U(V({},c),{description:P.description||c.description,expertise_area:P.expertise_area||c.expertise_area,specialization:P.specialization||c.specialization,industry:P.industry||c.industry,years_experience:P.years_experience||c.years_experience,prompt_instruction:P.prompt_instruction||
8c.prompt_instruction,icon_emoji:P.icon_emoji||c.icon_emoji,isEnriched:!0})})}catch(w){return t}},y=async()=>{if(!x){L.error("Selecteer eerst een categorie");return}const t=f.filter(u=>u.selected);if(t.length===0){L.error("Selecteer minimaal één rol om te importeren");return}B(!0);try{let u=t;if(N){const h=t.filter(Y);if(h.length>0){S(!0),I(10),L.info(`AI verrijkt ${h.length} rollen met volledige informatie...`);const w=5,j=[];for(let C=0;C<t.length;C+=w){const c=t.slice(C,C+w),Q=await a(c);j.push(...Q);const P=Math.min(90,(C+c.length)/t.length*80+10);I(P)}u=j,I(95)}}const o=u.map(h=>{var w;return{name:h.display_name.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"_").slice(0,50),display_name:h.display_name,description:h.description||null,expertise_area:h.expertise_area||null,specialization:h.specialization||null,industry:h.industry||null,years_experience:h.years_experience||null,prompt_instruction:h.prompt_instruction||null,icon_emoji:h.icon_emoji||"ð¤",color:((w=i.find(j=>j.id===x))==null?void 0:w.color)||"#3B82F6",category_id:x,is_active:!0,is_system:!1,sort_order:0,usage_count:0,suggestion_count:0}}),{error:D}=await X.from("lumen_ai_roles").insert(o);if(D)throw D;I(100),L.success(`${t.length} rollen succesvol geïmporteerd${N?" en verrijkt met AI":""}`),m.invalidateQueries({queryKey:["ai-roles"]}),g(null),p([]),d(""),I(0),S(!1),r(!1)}catch(u){L.error("Fout bij het importeren van rollen")}finally{B(!1),S(!1)}},b=()=>{g(null),p([]),d(""),_(null),I(0),S(!1),r(!1)},$=f.filter(t=>t.selected).length,H=f.filter(t=>t.selected&&Y(t)).length;return e.jsx(ce,{open:s,onOpenChange:b,children:e.jsxs(de,{className:"max-w-3xl max-h-[90vh] flex flex-col",children:[e.jsxs(pe,{children:[e.jsxs(me,{className:"flex items-center gap-2",children:[e.jsx(ue,{className:"h-5 w-5"}),"AI Rollen Importeren"]}),e.jsx(he,{children:"Upload een Word document met AI rollen. Ontbrekende informatie wordt automatisch aangevuld door AI."})]}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ee,{children:"Categorie"}),e.jsxs(ye,{value:x,onValueChange:d,children:[e.jsx(ge,{children:e.jsx(fe,{placeholder:"Selecteer een categorie..."})}),e.jsx(xe,{children:i.map(t=>e.jsx(we,{value:t.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:t.color}}),t.display_name]})},t.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ee,{children:"AI Verrijking"}),e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-muted/30",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ve,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-sm",children:"Automatisch aanvullen met AI"})]}),e.jsx(ke,{checked:N,onCheckedChange:n})]})]})]}),!l&&!f.length&&e.jsxs("label",{className:"flex flex-col items-center justify-center w-full h-48 border-2 border-dashed border-border/50 rounded-xl cursor-pointer hover:border-primary/50 hover:bg-muted/30 transition-colors",children:[e.jsxs("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[e.jsx(re,{className:"w-10 h-10 mb-3 text-muted-foreground"}),e.jsxs("p",{className:"mb-2 text-sm text-muted-foreground",children:[e.jsx("span",{className:"font-semibold",children:"Klik om te uploaden"})," of sleep een bestand"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Word documenten (.docx, .doc) of tekst bestanden (.txt)"})]}),e.jsx("input",{type:"file",className:"hidden",accept:".docx,.doc,.txt,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword,text/plain",onChange:v})]}),K&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(te,{className:"h-8 w-8 animate-spin text-primary mb-3"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Document wordt verwerkt..."})]}),R&&e.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-lg bg-destructive/10 border border-destructive/20",children:[e.jsx(je,{className:"h-5 w-5 text-destructive shrink-0"}),e.jsx("p",{className:"text-sm text-destructive",children:R})]}),T&&e.jsxs("div",{className:"space-y-2 p-4 rounded-lg bg-primary/5 border border-primary/20",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-primary font-medium",children:[e.jsx(se,{className:"h-4 w-4 animate-pulse"}),"AI verrijkt rollen met volledige informatie..."]}),e.jsx(be,{value:W,className:"h-2"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Beschrijvingen, expertisegebieden en prompt instructies worden gegenereerd"})]}),f.length>0&&!T&&e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(z,{variant:"secondary",className:"gap-1",children:[e.jsx(ie,{className:"h-3 w-3"}),$," van ",f.length," geselecteerd"]}),N&&H>0&&e.jsxs(z,{variant:"outline",className:"gap-1 border-primary/30 text-primary",children:[e.jsx(J,{className:"h-3 w-3"}),H," worden verrijkt"]}),l&&e.jsxs(z,{variant:"outline",className:"gap-1",children:[e.jsx(re,{className:"h-3 w-3"}),l.name]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{variant:"ghost",size:"sm",onClick:E,children:"Alles selecteren"}),e.jsx(F,{variant:"ghost",size:"sm",onClick:O,children:"Niets selecteren"}),e.jsxs(F,{variant:"ghost",size:"sm",onClick:()=>{g(null),p([]),_(null)},children:[e.jsx(_e,{className:"h-4 w-4 mr-1"}),"Nieuw bestand"]})]})]}),e.jsx(Ne,{className:"flex-1 -mx-6 px-6",children:e.jsx("div",{className:"space-y-2 pb-4",children:f.map(t=>{const u=Y(t);return e.jsx(Ce,{className:Ae("p-3 cursor-pointer transition-all",t.selected?"border-primary bg-primary/5":"border-border/50 hover:border-border"),onClick:()=>k(t.id),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ze,{checked:t.selected,onCheckedChange:()=>k(t.id),className:"mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-xl",children:t.icon_emoji}),e.jsx("h4",{className:"font-medium text-sm",children:t.display_name}),N&&u&&t.selected&&e.jsxs(z,{variant:"outline",className:"text-[10px] py-0 gap-1 border-primary/30 text-primary",children:[e.jsx(J,{className:"h-2.5 w-2.5"}),"Wordt verrijkt"]}),t.isEnriched&&e.jsxs(z,{variant:"outline",className:"text-[10px] py-0 gap-1 border-emerald-500/30 text-emerald-600",children:[e.jsx(ie,{className:"h-2.5 w-2.5"}),"Verrijkt"]})]}),t.description?e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:t.description}
8):e.jsx("p",{className:"text-xs text-muted-foreground/60 italic mb-2",children:"Beschrijving wordt gegenereerd door AI..."}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[t.expertise_area?e.jsx(z,{variant:"outline",className:"text-[10px] py-0",children:t.expertise_area}):N&&e.jsx(z,{variant:"outline",className:"text-[10px] py-0 border-dashed text-muted-foreground",children:"Expertise (AI)"}),t.specialization?e.jsx(z,{variant:"outline",className:"text-[10px] py-0",children:t.specialization}):null,t.industry?e.jsx(z,{variant:"outline",className:"text-[10px] py-0",children:t.industry}):null,!t.prompt_instruction&&N&&e.jsx(z,{variant:"outline",className:"text-[10px] py-0 border-dashed text-muted-foreground",children:"Prompt (AI)"})]})]})]})},t.id)})})})]})]}),e.jsxs(Pe,{className:"mt-4",children:[e.jsx(F,{variant:"outline",onClick:b,disabled:Z,children:"Annuleren"}),e.jsx(F,{onClick:y,disabled:!x||$===0||Z||T,children:Z?e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"h-4 w-4 mr-2 animate-spin"}),T?"Verrijken...":"Importeren..."]}):e.jsxs(e.Fragment,{children:[N&&H>0?e.jsx(se,{className:"h-4 w-4 mr-2"}):e.jsx(J,{className:"h-4 w-4 mr-2"}),$," rollen importeren",N&&H>0&&" + verrijken"]})})]})]})})}export{qe as ImportRolesDialog};
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.