1import{s as h}from"./index-L4IMfF6I.js";import{a as k,s as _}from"./index-Bna06bUG.js";import{s as y}from"./index-CiVQnkqS.js";import{W as V,r as w,c as j,b as t,d as s,w as c,F as M,O as S,a as $}from"./index-BiDzv_XD.js";const B={class:"flex items-center px-6 md:px-0 border-t border-surface-200 dark:border-surface-700 md:border-0 pt-6 md:pt-0"},C={class:"bg-surface-0 dark:bg-surface-950 grid gap-4 mt-6 grid-nogutter p-6 md:border-surface-200 dark:md:border-surface-700 md:border rounded"},I={class:"col-span-12"},D={class:"col-span-12"},F={class:"col-span-12"},N={class:"col-span-12 flex gap-x-4 justify-end mt-16"},R=Object.assign({inheritAttrs:!1},{__name:"ComposeNew",emits:["new:mail"],setup(T,{emit:m}){const p=m,n=V(),a=w({});function f(){n.push({name:"mail-inbox"})}function b(){const l={...a.value,id:x(),sent:!0,archived:!1,trash:!1,spam:!1,starred:!1,important:!1,date:g(),image:"avatar.png"};p("new:mail",l),n.push({name:"mail-inbox"})}function x(){let l="",e="0123456789";for(let r=0;r<5;r++)l+=e.charAt(Math.floor(Math.random()*e.length));return l}function g(){return new Date().toDateString().split(" ").slice(1,4).join(" ")}return(l,e)=>{const r=S,i=_,d=y,u=k,v=h;return $(),j(M,null,[t("div",B,[s(r,{type:"button",icon:"pi pi-chevron-left",class:"border-surface-200 dark:border-surface-700 text-surface-900 dark:text-surface-0 w-12 h-12 mr-4",outlined:"",severity:"secondary",onClick:e[0]||(e[0]=o=>f())}),e[5]||(e[5]=t("span",{class:"block text-surface-900 dark:text-surface-0 font-bold text-xl"},"Compose Message",-1))]),t("div",C,[t("div",I,[e[6]||(e[6]=t("label",{for:"to",class:"text-surface-900 dark:text-surface-0 font-semibold"},"To",-1)),s(u,{style:{height:"3.5rem"},class:"mt-4"},{default:c(()=>[s(i,{class:"pi pi-user",style:{left:"1.5rem"}}),s(d,{id:"to",type:"text",modelValue:a.value.to,"onUpdate:modelValue":e[1]||(e[1]=o=>a.value.to=o),placeholder:"To",class:"!pl-16 text-surface-900 dark:text-surface-0 font-semibold",fluid:"",style:{height:"3.5rem"}},null,8,["modelValue"])]),_:1})]),t("div",D,[e[7]||(e[7]=t("label",{for:"Subject",class:"text-surface-900 dark:text-surface-0 font-semibold"},"Subject",-1)),s(u,{style:{height:"3.5rem"},class:"mt-4"},{default:c(()=>[s(i,{class:"pi pi-pencil",style:{left:"1.5rem"}}),s(d,{id:"subject",type:"text",modelValue:a.value.title,"onUpdate:modelValue":e[2]||(e[2]=o=>a.value.title=o),placeholder:"Subject",class:"!pl-16 text-surface-900 dark:text-surface-0 font-semibold",fluid:"",style:{height:"3.5rem"}},null,8,["modelValue"])]),_:1})]),t("div",F,[s(v,{modelValue:a.value.message,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.message=o),editorStyle:" height: 250px "},null,8,["modelValue"])]),t("div",N,[s(r,{type:"button",class:"h-12 w-full sm:w-auto",icon:"pi pi-send",label:"Send Message",onClick:e[4]||(e[4]=o=>b())})])])],64)}}});export{R 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.