1import{r as m,j as e,t as j,w as y,x as g,v as f,B as d,R as v,a6 as N,aH as u}from"./index-CcMLSBG6.js";import{T as C}from"./TechnicalAdminLayout-BwhlunFu.js";import{L as n}from"./label-6YVF-Fk-.js";import{S as b,a as w,b as S,c as k,d as P}from"./select-DljSOX27.js";import{S as t}from"./switch-DimzQKXP.js";import{I as i}from"./input-6C8gsjbZ.js";import{P as h}from"./play-CqJPcbZy.js";import"./lock-CkLMpw2q.js";import"./chart-no-axes-column-D2swLHl6.js";import"./dollar-sign-DMrgMiCk.js";import"./bot-C7e4-GsS.js";import"./wrench-C9-gyDf5.js";import"./map-pin-luXfVPf-.js";function T(){const[c,o]=m.useState(!1),[a,r]=m.useState({clearChat:!0,clearOffers:!0,clearDocuments:!0,simulationType:"new_mortgage",skipPayment:!0,userFullName:"××©× ×שר×××",userEmail:"",userPhone:"0501234567",propertyValue:2e6,loanAmount:14e5,monthlyIncome:25e3}),x=[{id:"new_mortgage",label:"×ש×× ×ª× ×××©× - ×××¨× ×¨×ש×× ×"},{id:"refinance",label:"××××ר ×ש×× ×ª× ×§×××ת"},{id:"investment",label:"××רת ×שקע×"}],p=async()=>{o(!0);try{a.clearChat&&console.log("××××§ ××ס××ר××ת צ׳××..."),a.clearOffers&&console.log("××××§ ×צע×ת ×§××××ת..."),a.clearDocuments&&console.log("××××§ ×ס×××× ×§×××××..."),await N.User.updateMyUserData({full_name:a.userFullName,email:a.userEmail,phone:a.userPhone,simulation_mode:!0,simulation_type:a.simulationType,simulation_data:{property_value:a.propertyValue,loan_amount:a.loanAmount,monthly_income:a.monthlyIncome,skip_payment:a.skipPayment}});const s=`/Chat?simulation=true&type=${a.simulationType}`;window.location.href=s,u({title:"×ס××××צ×× ×××× ××צ×××",description:"×××¢×ר ×צ'××..."})}catch(s){console.error("Simulation error:",s),u({title:"ש×××× ××פע×ת ×ס××××צ××",description:"×× × × ×¡× ×©××",variant:"destructive"})}finally{o(!1)}};return e.jsxs(j,{className:"w-full",children:[e.jsx(y,{children:e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(h,{className:"h-5 w-5"}),"×פע×ת ס××××צ×× ×××ר×"]})}),e.jsxs(f,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"ס×× ×ש×× ×ª×"}),e.jsxs(b,{value:a.simulationType,onValueChange:s=>r(l=>({...l,simulationType:s})),children:[e.jsx(w,{children:e.jsx(S,{placeholder:"××ר ס×× ×ש×× ×ª×"})}),e.jsx(k,{children:x.map(s=>e.jsx(P,{value:s.id,children:s.label},s.id))})]})]}),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(n,{children:"×©× ×××"}),e.jsx(i,{value:a.userFullName,onChange:s=>r(l=>({...l,userFullName:s.target.value})),placeholder:"×©× ×××"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"×××××× (×× ××××)"}),e.jsx(i,{value:a.userEmail,onChange:s=>r(l=>({...l,userEmail:s.target.value})),placeholder:"××××××"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"××פ××"}),e.jsx(i,{value:a.userPhone,onChange:s=>r(l=>({...l,userPhone:s.target.value})),placeholder:"××פ××"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"ש××× × ×ס"}),e.jsx(i,{type:"number",value:a.propertyValue,onChange:s=>r(l=>({...l,propertyValue:Number(s.target.value)})),placeholder:"ש××× × ×ס"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"ס××× ××××××"}),e.jsx(i,{type:"number",value:a.loanAmount,onChange:s=>r(l=>({...l,loanAmount:Number(s.target.value)})),placeholder:"ס××× ××××××"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"××× ×¡× ×××ש×ת"}),e.jsx(i,{type:"number",value:a.monthlyIncome,onChange:s=>r(l=>({...l,monthlyIncome:Number(s.target.value)})),placeholder:"××× ×¡× ×××ש×ת"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"××× ×¢× ×ª×©×××"}),e.jsx(t,{checked:a.skipPayment,onCheckedChange:s=>r(l=>({...l,skipPayment:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"× ×§× ××ס××ר××ת צ'××"}),e.jsx(t,{checked:a.clearChat,onCheckedChange:s=>r(l=>({...l,clearChat:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"× ×§× ×צע×ת ×§××××ת"}),e.jsx(t,{checked:a.clearOffers,onCheckedChange:s=>r(l=>({...l,clearOffers:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"× ×§× ×ס××××"}),e.jsx(t,{checked:a.clearDocuments,onCheckedChange:s=>r(l=>({...l,clearDocuments:s}))})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(d,{variant:"outline",onClick:()=>
1window.location.reload(),disabled:c,children:[e.jsx(v,{className:"h-4 w-4 ml-2"}),"×פס ×××"]}),e.jsxs(d,{onClick:p,disabled:c,children:[e.jsx(h,{className:"h-4 w-4 ml-2"}),"×ת×× ×¡××××צ××"]})]})]})]})}function M(){return e.jsx(C,{currentPage:"AdminSimulation",children:e.jsxs("div",{className:"container max-w-7xl mx-auto p-6 space-y-8",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"××× ×¡××××צ××"}),e.jsx("p",{className:"text-gray-500",children:"×××× ×× ×××× ××××קת ת××××× ××ש×× ×ª× ××ער×ת"})]}),e.jsx("div",{className:"grid gap-6 grid-cols-1",children:e.jsx(T,{})})]})})}export{M 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.