import{j as e}from"./app-BwDemWQz.js";import{P as N}from"./PlatformIcon-BoGOJKWv.js";import{M as m,S as d,E as u}from"./AccountSelection-Dkq3iC5W.js";import{H as h}from"./heart-WioyV5gb.js";import{S as p}from"./emoji-picker-react.esm-C2auypZg.js";import{c as b}from"./createLucideIcon-BASx8f0E.js";/**
 * @license lucide-react v0.539.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],f=b("bookmark",w);/**
 * @license lucide-react v0.539.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y=[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]],k=b("repeat-2",y);/**
 * @license lucide-react v0.539.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],j=b("thumbs-up",z),R=r=>{const c=/#[a-zA-Z0-9_]+/g;return r.match(c)||[]},g=r=>{const c=/#[a-zA-Z0-9_]+/g,s=/(https?:\/\/[^\s]+)/g;return r.split(/(#[a-zA-Z0-9_]+|https?:\/\/[^\s]+)/g).map((t,a)=>t?c.test(t)?e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-600 text-yellow-800 dark:text-yellow-200 px-1 rounded",children:t},a):s.test(t)?e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:t},a):t:null).filter(Boolean)};function J({postContent:r="",postType:c="feed",selectedMedia:s=[]}){const l={name:"James Clerk"},t=R(r),a=()=>e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-800 overflow-hidden w-full max-w-full sm:max-w-md flex flex-col",children:[e.jsxs("div",{className:"p-3 sm:p-4 border-b border-gray-100 dark:border-gray-700 flex items-center gap-3",children:[e.jsx(N,{slug:"facebook",size:24,round:!0}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-medium text-gray-900 dark:text-white truncate",children:l.name}),e.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{children:"Now"}),e.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("div",{className:"w-3 h-3 border border-gray-400 rounded-sm flex items-center justify-center",children:e.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full"})})]})]})]}),e.jsxs("div",{className:"p-3 sm:p-4 flex flex-col gap-4",children:[e.jsx("div",{className:"text-gray-900 dark:text-white whitespace-pre-wrap break-words",children:r?g(r):"What's in your mind"}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((n,o)=>e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full text-sm font-medium",children:n},o))}),s.length>0&&e.jsx("div",{className:"rounded-lg overflow-hidden",children:s.length===1?s[0].type==="video"?e.jsxs("video",{src:s[0].url||"/placeholder.svg",poster:s[0].thumbnail,controls:!0,className:"w-full max-h-96 object-cover rounded-lg",preload:"metadata",type:"video/mp4",children:[e.jsx("source",{src:s[0].url,type:"video/mp4"}),e.jsx("source",{src:s[0].url,type:"video/webm"}),e.jsx("source",{src:s[0].url,type:"video/ogg"}),"Your browser does not support the video tag."]}):e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Post image",className:"w-full max-h-96 object-cover rounded-lg"}):e.jsx("div",{className:"grid grid-cols-2 gap-1",children:s.slice(0,4).map((n,o)=>e.jsxs("div",{className:"relative aspect-square",children:[n.type==="video"?e.jsxs("video",{src:n.url,poster:n.thumbnail,className:"w-full h-full object-cover",preload:"metadata",muted:!0,type:"video/mp4",children:[e.jsx("source",{src:n.url,type:"video/mp4"}),e.jsx("source",{src:n.url,type:"video/webm"}),e.jsx("source",{src:n.url,type:"video/ogg"}),"Your browser does not support the video tag."]}):e.jsx("img",{src:n.thumbnail||n.url,alt:n.alt||`Post image ${o+1}`,className:"w-full h-full object-cover"}),o===3&&s.length>4&&e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center rounded",children:e.jsxs("span",{className:"text-white text-xl font-bold",children:["+",s.length-4]})})]},n.id))})})]}),e.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 p-3 sm:p-4",children:e.jsx("div",{className:"flex justify-around items-center gap-1 max-w-full",children:["Like","Comment","Share"].map(n=>e.jsxs("button",{className:"flex items-center gap-1 px-2 py-2 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg text-sm min-w-0 flex-1 justify-center",children:[n==="Like"&&e.jsx(j,{className:"w-4 h-4 flex-shrink-0"}),n==="Comment"&&e.jsx(m,{className:"w-4 h-4 flex-shrink-0"}),n==="Share"&&e.jsx(d,{className:"w-4 h-4 flex-shrink-0"})]},n))})})]}),i=()=>e.jsxs("div",{className:"bg-black rounded-lg overflow-hidden aspect-[9/16] max-w-[280px] mx-auto relative",children:[s.length>0?s[0].type==="video"?e.jsxs("video",{src:s[0].url,poster:s[0].thumbnail,className:"w-full h-full object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,type:"video/mp4",children:[e.jsx("source",{src:s[0].url,type:"video/mp4"}),e.jsx("source",{src:s[0].url,type:"video/webm"}),e.jsx("source",{src:s[0].url,type:"video/ogg"}),"Your browser does not support the video tag."]}):e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Reel image",className:"w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-white",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-blue-600 rounded-full flex items-center justify-center mb-2 mx-auto",children:e.jsx("div",{className:"w-0 h-0 border-l-[8px] border-l-white border-y-[6px] border-y-transparent ml-1"})}),e.jsx("p",{className:"text-sm",children:"No media selected"})]})}),e.jsx("div",{className:"absolute top-4 right-4 flex flex-col gap-4",children:e.jsx("div",{className:"w-8 h-8 bg-white/20 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-white text-xs font-bold",children:"111k"})})}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/80 to-transparent",children:e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-white text-xs font-bold",children:"f"})}),e.jsx("span",{className:"text-white font-medium",children:l.name}),e.jsx("span",{className:"text-white/70 text-sm",children:"Now"})]}),e.jsx("p",{className:"text-white text-sm mb-2",children:r?g(r):"What's in your mind"}),t.length>0&&e.jsx("div",{className:"text-cyan-400 text-sm",children:t.join(" ")})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white",children:e.jsx(h,{className:"w-5 h-5"})}),e.jsx("div",{className:"text-white text-xs text-center",children:"23k"}),e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white",children:e.jsx(m,{className:"w-5 h-5"})}),e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white",children:e.jsx(d,{className:"w-5 h-5"})}),e.jsx("div",{className:"text-white text-xs text-center",children:"44"})]})]})})]}),x=()=>e.jsxs("div",{className:"bg-black rounded-lg overflow-hidden aspect-[9/16] max-w-[280px] mx-auto relative",children:[s.length>0?s[0].type==="video"?e.jsxs("video",{src:s[0].url,poster:s[0].thumbnail,className:"w-full h-full object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,type:"video/mp4",children:[e.jsx("source",{src:s[0].url,type:"video/mp4"}),e.jsx("source",{src:s[0].url,type:"video/webm"}),e.jsx("source",{src:s[0].url,type:"video/ogg"}),"Your browser does not support the video tag."]}):e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Story image",className:"w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-white",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-blue-600 rounded-full flex items-center justify-center mb-2 mx-auto",children:e.jsx("div",{className:"w-0 h-0 border-l-[8px] border-l-white border-y-[6px] border-y-transparent ml-1"})}),e.jsx("p",{className:"text-sm",children:"No media selected"})]})}),e.jsx("div",{className:"absolute top-4 left-4 right-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-white text-xs font-bold",children:"f"})}),e.jsx("span",{className:"text-white font-medium",children:l.name}),e.jsx("span",{className:"text-white/70 text-sm",children:"Now"})]})}),e.jsx("div",{className:"absolute top-2 left-4 right-4",children:e.jsx("div",{className:"h-0.5 bg-white/30 rounded-full",children:e.jsx("div",{className:"h-full w-1/3 bg-white rounded-full"})})}),r&&e.jsx("div",{className:"absolute bottom-20 left-4 right-4",children:e.jsx("p",{className:"text-white text-lg font-medium text-center",children:g(r)})})]});switch(c){case"reels":return i();case"story":return x();default:return a()}}const P=r=>{const c=/#[a-zA-Z0-9_]+/g;return r.match(c)||[]},v=r=>{const c=/#[a-zA-Z0-9_]+/g,s=/(https?:\/\/[^\s]+)/g;return r.split(/(#[a-zA-Z0-9_]+|https?:\/\/[^\s]+)/g).map((t,a)=>t?c.test(t)?e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-600 text-yellow-800 dark:text-yellow-200 px-1 rounded",children:t},a):s.test(t)?e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:t},a):t:null).filter(Boolean)};function L({postContent:r="",postType:c="feed",selectedMedia:s=[]}){const l={name:"James Clerk",username:"@jamesclerk",avatar:"/diverse-user-avatars.png"},t=P(r),a=()=>e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-800 overflow-hidden min-h-[350px] w-full",children:[e.jsx("div",{className:"p-4 border-b border-gray-100 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 p-0.5",children:e.jsx("img",{src:l.avatar,alt:l.name,className:"w-full h-full rounded-full border-2 border-white object-cover"})}),e.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:l.username})]}),e.jsx(u,{className:"w-5 h-5 text-gray-600 dark:text-gray-400"})]})}),s.length>0?e.jsx("div",{className:"aspect-square",children:s.length===1?s[0].type==="video"?e.jsx("video",{src:s[0].url,poster:s[0].thumbnail,controls:!0,className:"w-full h-full object-cover",preload:"metadata",children:"Your browser does not support the video tag."}):e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Post image",className:"w-full h-full object-cover"}):e.jsx("div",{className:"grid grid-cols-2 gap-0.5 h-full",children:s.slice(0,4).map((x,n)=>e.jsxs("div",{className:"relative aspect-square",children:[x.type==="video"?e.jsx("video",{src:x.url,poster:x.thumbnail,className:"w-full h-full object-cover",preload:"metadata",muted:!0,children:"Your browser does not support the video tag."}):e.jsx("img",{src:x.thumbnail||x.url,alt:x.alt||`Post image ${n+1}`,className:"w-full h-full object-cover"}),n===3&&s.length>4&&e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center",children:e.jsxs("span",{className:"text-white text-xl font-bold",children:["+",s.length-4]})})]},x.id))})}):e.jsx("div",{className:"bg-gray-50 dark:bg-zinc-800 aspect-square flex items-center justify-center text-gray-500 dark:text-gray-400",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gradient-to-r from-purple-500 to-pink-500 rounded-full flex items-center justify-center mb-2 mx-auto",children:e.jsx("div",{className:"w-0 h-0 border-l-[8px] border-l-white border-y-[6px] border-y-transparent ml-1"})}),e.jsx("p",{className:"text-sm",children:"No media selected"})]})}),e.jsxs("div",{className:"p-4 mt-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(h,{className:"w-6 h-6 text-gray-900 dark:text-white"}),e.jsx(m,{className:"w-6 h-6 text-gray-900 dark:text-white"}),e.jsx(p,{className:"w-6 h-6 text-gray-900 dark:text-white"})]}),e.jsx(f,{className:"w-6 h-6 text-gray-900 dark:text-white"})]}),e.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:e.jsx("span",{className:"font-medium",children:"0 likes"})}),e.jsxs("div",{className:"text-sm text-gray-900 dark:text-white break-words",children:[e.jsx("span",{className:"font-medium",children:l.username}),e.jsx("span",{className:"ml-2",children:r?v(r):"What's in your mind"})]}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.map((x,n)=>e.jsx("span",{className:"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded-full text-sm font-medium",children:x},n))}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-2",children:e.jsx("span",{children:"now"})})]})]}),i=()=>{var x,n;return e.jsxs("div",{className:"bg-black rounded-lg overflow-hidden aspect-[9/16] max-w-[280px] mx-auto relative",children:[s.length>0?s[0].type==="video"?e.jsx("video",{src:s[0].url,poster:s[0].thumbnail,className:"w-full h-full object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,children:"Your browser does not support the video tag."}):e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Reel image",className:"w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-white",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gradient-to-r from-purple-500 to-pink-500 rounded-full flex items-center justify-center mb-2 mx-auto",children:e.jsx("div",{className:"w-0 h-0 border-l-[8px] border-l-white border-y-[6px] border-y-transparent ml-1"})}),e.jsx("p",{className:"text-sm",children:"No media selected"})]})}),e.jsxs("div",{className:"absolute top-4 left-4 right-4 flex justify-between items-center",children:[e.jsx("span",{className:"text-white font-medium",children:"Reels"}),e.jsx("div",{className:"w-6 h-6 bg-white/20 rounded-full flex items-center justify-center",children:e.jsx(u,{className:"w-4 h-4 text-white"})})]}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/80 to-transparent",children:e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 p-0.5",children:e.jsx("img",{src:l.avatar,alt:l.name,className:"w-full h-full rounded-full border-2 border-white object-cover"})}),e.jsx("span",{className:"text-white font-medium",children:l.username}),e.jsx("button",{className:"px-3 py-1 border border-white rounded-md text-white text-xs font-medium",children:"Follow"})]}),e.jsx("p",{className:"text-white text-sm mb-2",children:r?v(r):"What's in your mind"}),t.length>0&&e.jsx("div",{className:"text-blue-400 text-sm mb-2",children:t.join(" ")}),e.jsx("div",{className:"flex items-center gap-2 text-white text-sm",children:e.jsx("span",{children:"♪ Original audio"})})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white mb-1",children:e.jsx(h,{className:"w-5 h-5"})}),e.jsx("span",{className:"text-white text-xs",children:"12.5K"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white mb-1",children:e.jsx(m,{className:"w-5 h-5"})}),e.jsx("span",{className:"text-white text-xs",children:"234"})]}),e.jsx("div",{className:"text-center",children:e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white mb-1",children:e.jsx(p,{className:"w-5 h-5"})})}),e.jsx("div",{className:"text-center",children:e.jsx("button",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white mb-1",children:e.jsx(f,{className:"w-5 h-5"})})}),e.jsx("div",{className:"w-6 h-6 rounded-sm border border-white overflow-hidden",children:e.jsx("img",{src:((x=s[0])==null?void 0:x.thumbnail)||((n=s[0])==null?void 0:n.url)||"/placeholder.svg",alt:"Audio thumbnail",className:"w-full h-full object-cover"})})]})]})})]})};switch(c){case"reels":return i();default:return a()}}const _=r=>{const c=/#[a-zA-Z0-9_]+/g;return r.match(c)||[]},T=r=>{const c=/#[a-zA-Z0-9_]+/g,s=/(https?:\/\/[^\s]+)/g;return r.split(/(#[a-zA-Z0-9_]+|https?:\/\/[^\s]+)/g).map((t,a)=>t?c.test(t)?e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-600 text-yellow-800 dark:text-yellow-200 px-1 rounded",children:t},a):s.test(t)?e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:t},a):t:null).filter(Boolean)};function B({postContent:r="",postType:c="tweet",selectedMedia:s=[]}){const l={name:"James Clerk",username:"@jamesclerk",avatar:"/diverse-user-avatars.png"},t=_(r);return e.jsx("div",{className:"bg-white dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-800 p-4 min-h-[320px] w-full",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("img",{src:l.avatar,alt:l.name,className:"w-10 h-10 rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("span",{className:"font-bold text-gray-900 dark:text-white",children:l.name}),e.jsx("span",{className:"text-gray-500 dark:text-gray-400 truncate",children:l.username}),e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"·"}),e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"now"})]}),e.jsx("div",{className:"text-gray-900 dark:text-white mb-3 whitespace-pre-wrap break-words",children:r?T(r):"What's happening?"}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:t.map((a,i)=>e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full text-sm font-medium",children:a},i))}),s.length>0?e.jsx("div",{className:"mb-3 rounded-2xl overflow-hidden border border-gray-200 dark:border-gray-600",children:s.length===1?s[0].type==="video"?e.jsx("video",{src:s[0].url,poster:s[0].thumbnail,controls:!0,className:"w-full max-h-96 object-cover",preload:"metadata",children:"Your browser does not support the video tag."}):e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Tweet image",className:"w-full max-h-96 object-cover"}):e.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:s.slice(0,4).map((a,i)=>e.jsxs("div",{className:"relative aspect-video",children:[a.type==="video"?e.jsx("video",{src:a.url,poster:a.thumbnail,className:"w-full h-full object-cover",preload:"metadata",muted:!0,children:"Your browser does not support the video tag."}):e.jsx("img",{src:a.thumbnail||a.url,alt:a.alt||`Tweet image ${i+1}`,className:"w-full h-full object-cover"}),i===3&&s.length>4&&e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center",children:e.jsxs("span",{className:"text-white text-xl font-bold",children:["+",s.length-4]})})]},a.id))})}):null,e.jsxs("div",{className:"flex items-center justify-between w-full max-w-full",children:[e.jsx("div",{className:"flex items-center gap-1 flex-1",children:e.jsxs("button",{className:"flex items-center gap-1 text-gray-500 dark:text-gray-400 hover:text-blue-500 transition-colors px-2 py-1 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 min-w-0",children:[e.jsx(m,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{className:"text-sm",children:"0"})]})}),e.jsx("div",{className:"flex items-center gap-1 flex-1",children:e.jsxs("button",{className:"flex items-center gap-1 text-gray-500 dark:text-gray-400 hover:text-green-500 transition-colors px-2 py-1 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 min-w-0",children:[e.jsx(k,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{className:"text-sm",children:"0"})]})}),e.jsx("div",{className:"flex items-center gap-1 flex-1",children:e.jsxs("button",{className:"flex items-center gap-1 text-gray-500 dark:text-gray-400 hover:text-red-500 transition-colors px-2 py-1 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 min-w-0",children:[e.jsx(h,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{className:"text-sm",children:"0"})]})}),e.jsx("div",{className:"flex items-center gap-1 flex-1",children:e.jsx("button",{className:"flex items-center gap-1 text-gray-500 dark:text-gray-400 hover:text-blue-500 transition-colors px-2 py-1 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 min-w-0",children:e.jsx(d,{className:"w-4 h-4 flex-shrink-0"})})})]})]})]})})}const A=r=>{const c=/#[a-zA-Z0-9_]+/g;return r.match(c)||[]},Z=r=>{const c=/#[a-zA-Z0-9_]+/g,s=/(https?:\/\/[^\s]+)/g;return r.split(/(#[a-zA-Z0-9_]+|https?:\/\/[^\s]+)/g).map((t,a)=>t?c.test(t)?e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-600 text-yellow-800 dark:text-yellow-200 px-1 rounded",children:t},a):s.test(t)?e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:t},a):t:null).filter(Boolean)};function W({postContent:r="",postType:c="post",selectedMedia:s=[]}){const l={name:"James Clerk",avatar:"/diverse-user-avatars.png"},t=A(r);return e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-800 p-4 min-h-[320px] w-full flex flex-col",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx("img",{src:l.avatar,alt:l.name,className:"w-12 h-12 rounded-full flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-medium text-gray-900 dark:text-white",children:l.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Professional Title"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"now"})]}),e.jsx(u,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 flex-shrink-0"})]}),e.jsx("div",{className:"text-gray-900 dark:text-white mb-4 whitespace-pre-wrap break-words",children:r?Z(r):"Share your professional thoughts..."}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:t.map((a,i)=>e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full text-sm font-medium",children:a},i))}),s&&s.length>0&&e.jsx("div",{className:"mb-4",children:s.length===1?e.jsx("div",{className:"rounded-lg overflow-hidden",children:e.jsx("img",{src:s[0].url||s[0].thumbnail,alt:s[0].alt||"Post image",className:"w-full h-64 object-cover"})}):e.jsx("div",{className:"grid grid-cols-2 gap-1 rounded-lg overflow-hidden",children:s.slice(0,4).map((a,i)=>e.jsxs("div",{className:"relative aspect-square",children:[e.jsx("img",{src:a.url||a.thumbnail,alt:a.alt||`Post image ${i+1}`,className:"w-full h-full object-cover"}),i===3&&s.length>4&&e.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-60 flex items-center justify-center",children:e.jsxs("span",{className:"text-white text-lg font-semibold",children:["+",s.length-4]})})]},a.id||i))})}),s.length===0&&e.jsx("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-lg p-6 text-center text-gray-500 dark:text-gray-400 mb-4",children:"No media selected"}),e.jsx("div",{className:"pt-4 border-t border-gray-100 dark:border-gray-700 mt-auto",children:e.jsxs("div",{className:"flex items-center justify-around gap-1 w-full max-w-full",children:[e.jsx("button",{className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 transition-colors px-2 py-2 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 flex-1 justify-center min-w-0",children:e.jsx(j,{className:"w-4 h-4 flex-shrink-0"})}),e.jsx("button",{className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 transition-colors px-2 py-2 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 flex-1 justify-center min-w-0",children:e.jsx(m,{className:"w-4 h-4 flex-shrink-0"})}),e.jsx("button",{className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 transition-colors px-2 py-2 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 flex-1 justify-center min-w-0",children:e.jsx(d,{className:"w-4 h-4 flex-shrink-0"})})]})})]})}const $=r=>{const c=/#[a-zA-Z0-9_]+/g;return r.match(c)||[]},Y=r=>{const c=/#[a-zA-Z0-9_]+/g,s=/(https?:\/\/[^\s]+)/g;return r.split(/(#[a-zA-Z0-9_]+|https?:\/\/[^\s]+)/g).map((t,a)=>t?c.test(t)?e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-600 text-yellow-800 dark:text-yellow-200 px-1 rounded",children:t},a):s.test(t)?e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:t},a):t:null).filter(Boolean)};function V({postContent:r="",postType:c="post",selectedMedia:s=[]}){const l={name:"James Clerk",username:"@jamesclerk",avatar:"/diverse-user-avatars.png"},t=$(r);return e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-800 overflow-hidden min-h-[320px] w-full flex flex-col",children:[e.jsx("div",{className:"p-4 border-b border-gray-100 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:l.avatar,alt:l.name,className:"w-8 h-8 rounded-full"}),e.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:l.username})]}),e.jsx(u,{className:"w-5 h-5 text-gray-600 dark:text-gray-400"})]})}),e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"text-gray-900 dark:text-white whitespace-pre-wrap mb-4 break-words",children:r?Y(r):"What's in your mind"}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:t.map((a,i)=>e.jsx("span",{className:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 px-2 py-1 rounded-full text-sm font-medium",children:a},i))}),s.length>0?e.jsx("div",{className:"mb-4",children:s.length===1?e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Post image",className:"w-full rounded-lg object-cover max-h-96"}):e.jsx("div",{className:"grid grid-cols-2 gap-1 rounded-lg overflow-hidden",children:s.slice(0,4).map((a,i)=>e.jsxs("div",{className:"relative aspect-square",children:[e.jsx("img",{src:a.thumbnail||a.url,alt:a.alt||`Post image ${i+1}`,className:"w-full h-full object-cover"}),i===3&&s.length>4&&e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center",children:e.jsxs("span",{className:"text-white text-xl font-bold",children:["+",s.length-4]})})]},a.id))})}):null]}),e.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 p-4 mt-auto",children:e.jsxs("div",{className:"flex justify-around items-center",children:[e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg transition-colors flex-1 justify-center",children:[e.jsx(j,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Like"})]}),e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg transition-colors flex-1 justify-center",children:[e.jsx(m,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Comment"})]}),e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg transition-colors flex-1 justify-center",children:[e.jsx(d,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Share"})]})]})})]})}function E({postContent:r="",postType:c="video",selectedMedia:s=[]}){const l={name:"James Clerk",username:"@jamesclerk",avatar:"/diverse-user-avatars.png"},t=a=>{const i=/(https?:\/\/[^\s]+)/g;return a.split(i).map((n,o)=>i.test(n)?e.jsx("span",{className:"text-blue-400",children:n},o):n)};return e.jsxs("div",{className:"bg-black rounded-lg overflow-hidden aspect-[9/16] max-w-[300px] mx-auto relative",children:[s.length>0&&s[0].type==="video"?e.jsx("video",{src:s[0].url,poster:s[0].thumbnail,className:"w-full h-full object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,children:"Your browser does not support the video tag."}):s.length>0&&s[0].type==="image"?e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"TikTok image",className:"w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-white",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-pink-500 rounded-full flex items-center justify-center mb-2 mx-auto",children:e.jsx("div",{className:"w-0 h-0 border-l-[8px] border-l-white border-y-[6px] border-y-transparent ml-1"})}),e.jsx("p",{className:"text-sm",children:"No video selected"})]})}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/80 to-transparent",children:e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("img",{src:l.avatar,alt:l.name,className:"w-8 h-8 rounded-full"}),e.jsx("span",{className:"text-white font-medium",children:l.username})]}),e.jsx("p",{className:"text-white text-sm",children:r?t(r):"Create amazing content..."})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("button",{className:"w-10 h-10 bg-gray-800/50 rounded-full flex items-center justify-center text-white",children:e.jsx(h,{className:"w-5 h-5"})}),e.jsx("button",{className:"w-10 h-10 bg-gray-800/50 rounded-full flex items-center justify-center text-white",children:e.jsx(m,{className:"w-5 h-5"})}),e.jsx("button",{className:"w-10 h-10 bg-gray-800/50 rounded-full flex items-center justify-center text-white",children:e.jsx(d,{className:"w-5 h-5"})})]})]})})]})}function C({postContent:r="",postType:c="video",selectedMedia:s=[]}){const l={name:"James Clerk",avatar:"/diverse-user-avatars.png"},t=a=>{const i=/(https?:\/\/[^\s]+)/g;return a.split(i).map((n,o)=>i.test(n)?e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:n},o):n)};return e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-800 overflow-hidden min-h-[320px] w-full",children:[e.jsx("div",{className:"bg-gray-900 aspect-video flex items-center justify-center text-white",children:s.length>0&&s[0].type==="video"?e.jsx("video",{src:s[0].url,poster:s[0].thumbnail,controls:!0,className:"w-full h-full object-cover",preload:"metadata",children:"Your browser does not support the video tag."}):s.length>0&&s[0].type==="image"?e.jsx("img",{src:s[0].thumbnail||s[0].url,alt:s[0].alt||"Video thumbnail",className:"w-full h-full object-cover"}):e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-20 h-20 bg-red-600 rounded-full flex items-center justify-center mb-3 mx-auto",children:e.jsx("div",{className:"w-0 h-0 border-l-[10px] border-l-white border-y-[8px] border-y-transparent ml-1"})}),e.jsx("p",{className:"text-sm",children:"No video selected"})]})}),e.jsxs("div",{className:"p-4 flex-1",children:[e.jsx("h3",{className:"font-medium text-gray-900 dark:text-white mb-2 break-words",children:r?t(r):"Video Title"}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400 mb-4",children:[e.jsx("span",{children:"0 views"}),e.jsx("span",{children:"•"}),e.jsx("span",{children:"now"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:l.avatar,alt:l.name,className:"w-10 h-10 rounded-full flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-sm",children:l.name}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"0 subscribers"})]})]})]})]})}export{J as F,L as I,W as L,E as T,C as Y,V as a,B as b};
