{"version":3,"file":"Composer.BeRG9dQQ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/JJXLOXBQh8y8gnSFdatl/435HpQylL6PoSN44fwiz/MessageBubble.js","https:/framerusercontent.com/modules/uXPBHwGoYt6rq19esxyW/Y2nWoxJKv0WSpSAwcJ3k/Composer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{tokens,fontFamily,clockHe}from\"https://framerusercontent.com/modules/tVCqDSXfHsd06f23WSmv/q3VfvjZzdGxtGx48WcZg/menoMaps.js\";/**\n * MessageBubble\n *\n * RTL Hebrew chat bubble for the request-detail messaging thread: `body`\n * (Body) with `clockHe(sentISO)` (Small, Muted) underneath. `direction`\n * controls both tone and side — \"From doctor\" is the console's own-message\n * perspective, a Tobacco-tinted bubble aligned to the inline-start (right\n * under RTL) with its bottom-right corner squared; \"From client\" is the\n * incoming message, a Bone bubble with a Soft Warm border aligned to the\n * inline-end (left under RTL) with its bottom-left corner squared. Stack\n * multiple MessageBubble rows to build a thread — doctor/client messages\n * land on opposite sides. Caps at ~68% of the container width.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 380\n */export default function MessageBubble(props){const{body=\"שלום, קיבלתי את הבקשה ואבדוק ואחזור אליך בהקדם.\",sentISO=\"2026-08-06T14:05:00.000Z\",direction=\"From client\",style}=props;const isDoctor=direction===\"From doctor\";return /*#__PURE__*/_jsx(\"div\",{className:\"meno-workspace\",dir:\"rtl\",style:{...style,position:\"relative\",boxSizing:\"border-box\",display:\"flex\",width:\"100%\",justifyContent:isDoctor?\"flex-start\":\"flex-end\",fontFamily},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",boxSizing:\"border-box\",display:\"flex\",flexDirection:\"column\",gap:\"4px\",maxWidth:\"min(84%, 580px)\",minWidth:0,padding:\"13px 16px\",borderRadius:isDoctor?\"14px 14px 4px 14px\":\"14px 14px 14px 4px\",backgroundColor:isDoctor?tokens.warmWash:tokens.bone,border:isDoctor?\"1px solid transparent\":`1px solid ${tokens.softWarm}`},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"15px\",fontWeight:400,lineHeight:\"1.75em\",color:tokens.modernEspresso,textAlign:\"right\",whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\"},children:body}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"11px\",fontWeight:400,lineHeight:\"1.2em\",color:tokens.mutedWarm,textAlign:\"right\"},children:clockHe(sentISO)})]})});}addPropertyControls(MessageBubble,{body:{type:ControlType.String,title:\"Body\",defaultValue:\"שלום, קיבלתי את הבקשה ואבדוק ואחזור אליך בהקדם.\",displayTextArea:true},sentISO:{type:ControlType.String,title:\"Sent (ISO)\",defaultValue:\"2026-08-06T14:05:00.000Z\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"From client\",\"From doctor\"],optionTitles:[\"מהמטופל\",\"מהרופא\"],defaultValue:\"From client\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MessageBubble\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"380\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"MessageDirection\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MessageBubbleProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{tokens,fontFamily}from\"https://framerusercontent.com/modules/tVCqDSXfHsd06f23WSmv/q3VfvjZzdGxtGx48WcZg/menoMaps.js\";/**\n * Real RTL message composer. The field is cleared only after the server write\n * succeeds; Enter sends and Shift+Enter inserts a new line.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 560\n */export default function Composer(props){const{config,placeholder=\"כתוב/י הודעה…\",onSend,disabled=false,sending=false,errorMessage=\"\",style}=props;const[value,setValue]=useState(\"\");const[internalSending,setInternalSending]=useState(false);const[localError,setLocalError]=useState(\"\");const busy=sending||internalSending;const cannotSend=disabled||busy||!value.trim();async function handleSend(){const body=value.trim();if(!body||disabled||busy||!onSend)return;setInternalSending(true);setLocalError(\"\");try{await onSend(body);setValue(\"\");}catch(error){setLocalError(error instanceof Error?error.message:\"לא הצלחנו לשלוח את ההודעה.\");}finally{setInternalSending(false);}}const visibleError=errorMessage||localError;return /*#__PURE__*/_jsxs(\"div\",{className:\"meno-workspace\",dir:\"rtl\",style:{...style,position:\"relative\",boxSizing:\"border-box\",display:\"flex\",flexDirection:\"column\",gap:\"7px\",width:\"100%\",fontFamily},children:[/*#__PURE__*/_jsxs(\"div\",{style:{boxSizing:\"border-box\",display:\"flex\",flexDirection:\"row\",alignItems:\"flex-end\",gap:\"8px\",width:\"100%\",padding:\"8px\",borderRadius:\"14px\",backgroundColor:tokens.bone,border:`1px solid ${visibleError?tokens.error:tokens.softWarm}`},children:[/*#__PURE__*/_jsx(\"style\",{children:`.meno-real-composer::placeholder{color:${tokens.mutedWarm};opacity:1}`}),/*#__PURE__*/_jsx(\"textarea\",{className:\"meno-real-composer\",dir:\"rtl\",value:value,placeholder:placeholder,\"aria-label\":placeholder,\"aria-invalid\":Boolean(visibleError),disabled:disabled||busy,maxLength:4e3,rows:1,onChange:event=>setValue(event.target.value),onKeyDown:event=>{if(event.key===\"Enter\"&&!event.shiftKey){event.preventDefault();void handleSend();}},style:{flex:\"1 1 auto\",minWidth:0,minHeight:\"44px\",maxHeight:\"120px\",resize:\"vertical\",border:\"none\",outline:\"none\",background:\"transparent\",padding:\"9px 10px\",fontFamily,fontSize:\"15px\",lineHeight:\"1.45em\",color:tokens.modernEspresso,textAlign:\"right\",opacity:disabled?.55:1}}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>void handleSend(),disabled:cannotSend||!onSend,\"aria-busy\":busy,style:{flex:\"none\",minWidth:\"76px\",minHeight:\"44px\",margin:0,cursor:cannotSend||!onSend?\"not-allowed\":\"pointer\",padding:\"11px 18px\",borderRadius:\"10px\",border:\"none\",backgroundColor:tokens.tobacco,color:tokens.bone,fontFamily,fontSize:\"15px\",fontWeight:600,lineHeight:\"1.2em\",whiteSpace:\"nowrap\",opacity:cannotSend||!onSend?.52:1,transition:\"opacity 0.15s ease, transform 0.08s ease\"},children:busy?\"שולח/ת…\":\"שליחה\"})]}),visibleError&&/*#__PURE__*/_jsx(\"div\",{role:\"alert\",style:{color:tokens.error,fontSize:\"13px\",lineHeight:\"1.35em\",textAlign:\"right\",paddingInline:\"4px\"},children:visibleError})]});}addPropertyControls(Composer,{placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"כתוב/י הודעה…\"},disabled:{type:ControlType.Boolean,title:\"Disabled\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"ComposerProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"Composer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"560\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"oPAgBG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,kDAAkD,UAAQ,2BAA2B,YAAU,cAAc,SAAO,EAAY,EAAS,IAAY,cAAc,OAAoB,EAAK,MAAM,CAAC,UAAU,iBAAiB,IAAI,MAAM,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,UAAU,aAAa,QAAQ,OAAO,MAAM,OAAO,eAAe,EAAS,aAAa,W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