1import{j as e,Q as c,v as x,s as b,B as p,a4 as y,S as w,ap as S,ac as u,h as o}from"./index-CuSEeJFb.js";import{C as M}from"./check-check-BVDNI4mA.js";function T({register:N,watch:v,businessProfile:t,isGeneratingField:r,onGenerateField:i}){const s=v("platformContent.message")||"",n={message:160},f=(a,m)=>{const l=a/m;return l>1?"text-red-500":l>.9?"text-orange-500":l>.7?"text-yellow-600":"text-green-600"},d=a=>a.length===0||a.length<=160?1:Math.ceil(a.length/153),h=(t==null?void 0:t.businessName)||"Your Business",g=(t==null?void 0:t.phone)||"(555) 123-4567";return e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"max-w-sm mx-auto bg-gray-900 rounded-3xl overflow-hidden mb-6 shadow-xl",children:[e.jsxs("div",{className:"bg-black text-white text-xs px-4 py-2 flex justify-between items-center",children:[e.jsx("span",{className:"font-medium",children:"9:41"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs("div",{className:"flex space-x-1",children:[e.jsx("div",{className:"w-1 h-1 bg-white rounded-full"}),e.jsx("div",{className:"w-1 h-1 bg-white rounded-full"}),e.jsx("div",{className:"w-1 h-1 bg-white rounded-full"}),e.jsx("div",{className:"w-1 h-1 bg-white rounded-full"})]}),e.jsx("div",{className:"w-6 h-3 border border-white rounded-sm",children:e.jsx("div",{className:"w-4 h-1 bg-white rounded-sm ml-0.5 mt-0.5"})})]})]}),e.jsxs("div",{className:"bg-gray-100 px-4 py-3 flex items-center justify-between border-b",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center",children:e.jsx(c,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-gray-900 text-sm",children:h}),e.jsx("p",{className:"text-xs text-gray-600",children:g})]})]}),e.jsx("div",{className:"text-blue-500",children:e.jsx("span",{className:"text-sm",children:"Details"})})]}),e.jsxs("div",{className:"bg-white p-4 space-y-4",style:{minHeight:"400px"},children:[e.jsx("div",{className:"space-y-3",children:e.jsx("div",{className:"flex justify-start",children:e.jsxs("div",{className:"bg-gray-200 rounded-2xl rounded-bl-md px-4 py-2 max-w-xs",children:[e.jsx("p",{className:"text-sm text-gray-900",children:"Thanks for your interest! We'll send you updates about our services."}),e.jsxs("div",{className:"flex items-center mt-1 text-xs text-gray-500",children:[e.jsx(x,{className:"w-3 h-3 mr-1"}),e.jsx("span",{children:"Yesterday 2:30 PM"})]})]})})}),s&&e.jsx("div",{className:"flex justify-start",children:e.jsxs("div",{className:"bg-gray-200 rounded-2xl rounded-bl-md px-4 py-2 max-w-xs",children:[e.jsx("p",{className:"text-sm text-gray-900 whitespace-pre-wrap",children:s}),e.jsxs("div",{className:"flex items-center justify-between mt-2",children:[e.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[e.jsx(x,{className:"w-3 h-3 mr-1"}),e.jsx("span",{children:"Now"})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(M,{className:"w-3 h-3 text-blue-500"}),e.jsx("span",{className:"text-xs text-blue-500",children:"Delivered"})]})]})]})}),!s&&e.jsx("div",{className:"flex justify-center items-center py-8 text-gray-400",children:e.jsxs("div",{className:"text-center",children:[e.jsx(c,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"SMS message preview will appear here"})]})})]}),e.jsxs("div",{className:"bg-gray-100 p-3 flex items-center space-x-2",children:[e.jsx("div",{className:"flex-1 bg-white rounded-full px-4 py-2 border",children:e.jsx("span",{className:"text-gray-400 text-sm",children:"Type a message..."})}),e.jsx("div",{className:"w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-white text-sm",children:"â"})})]})]}),e.jsxs("div",{className:"bg-white border rounded-lg p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-green-500 rounded-lg flex items-center justify-center",children:e.jsx(c,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-lg",children:"SMS Marketing Configuration"}),e.jsx(b,{variant:"secondary",className:"ml-auto",children:"Direct
1Communication"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{className:"text-sm font-medium text-gray-700",children:["SMS Message ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"text-xs text-gray-600",children:["Segments: ",e.jsx("span",{className:"font-medium",children:d(s)})]}),e.jsxs("span",{className:`text-xs font-medium ${f(s.length,n.message)}`,children:[s.length,"/",n.message]}),e.jsx(p,{type:"button",variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>i==null?void 0:i("message"),disabled:r==null?void 0:r("message"),children:r!=null&&r("message")?e.jsx(y,{className:"h-3 w-3 animate-spin"}):e.jsx(w,{className:"h-3 w-3"})})]})]}),e.jsx(S,{...N("platformContent.message"),placeholder:"Craft a concise, compelling SMS message with clear value and call-to-action",maxLength:320,rows:4,className:`${s.length>n.message?"border-orange-500":""} ${s.length>320?"border-red-500":""}`}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"space-y-1",children:[s.length<=160&&e.jsxs("p",{className:"text-green-600 flex items-center",children:[e.jsx(u,{className:"w-3 h-3 mr-1"}),"Single SMS message (most cost-effective)"]}),s.length>160&&s.length<=320&&e.jsxs("p",{className:"text-orange-600 flex items-center",children:[e.jsx(o,{className:"w-3 h-3 mr-1"}),"Multi-part SMS (",d(s)," segments, higher cost)"]}),s.length>320&&e.jsxs("p",{className:"text-red-600 flex items-center",children:[e.jsx(o,{className:"w-3 h-3 mr-1"}),"Message too long - consider shortening for better delivery"]})]}),e.jsx("div",{className:"text-right",children:e.jsxs("p",{className:"text-gray-600",children:["Est. cost: $",d(s)*.0075," per recipient"]})})]})]}),e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(o,{className:"h-5 w-5 text-green-600 mt-0.5"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h5",{className:"font-medium text-green-900",children:"SMS Marketing Best Practices"}),e.jsxs("ul",{className:"text-sm text-green-800 space-y-1",children:[e.jsx("li",{children:"⢠Keep messages under 160 characters to avoid multi-part SMS charges"}),e.jsx("li",{children:"⢠Include clear value proposition and compelling call-to-action"}),e.jsx("li",{children:"⢠Always provide opt-out instructions (Reply STOP)"}),e.jsx("li",{children:"⢠Send during business hours (9 AM - 8 PM) for best response"}),e.jsx("li",{children:"⢠Personalize with recipient's name when possible"}),e.jsx("li",{children:"⢠Include your business name for brand recognition"})]})]})]})}),e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-5 h-5 bg-blue-600 rounded-full flex items-center justify-center mt-0.5",children:e.jsx(u,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h5",{className:"font-medium text-blue-900",children:"SMS Compliance"}),e.jsxs("p",{className:"text-sm text-blue-800",children:["Ensure recipients have explicitly opted in to receive SMS messages from",e.jsxs("strong",{children:[" ",h]}),". All messages will automatically include opt-out instructions and your business identification as required by TCPA regulations."]})]})]})}),e.jsx("div",{className:"bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(x,{className:"h-5 w-5 text-green-600 mt-0.5"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h5",{className:"font-medium text-green-900",children:"Optimal Delivery Timing"}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[e.jsxs("div",{className:"bg-white rounded p-2 border border-green-100 text-center",children:[e.jsx("div",{className:"font-medium text-green-800",children:"Business Hours"}),e.jsx("div",{className:"text-green-600 mt-1",children:"9 AM - 6 PM"}
1),e.jsx("div",{className:"text-green-500 mt-1",children:"Highest Response"})]}),e.jsxs("div",{className:"bg-white rounded p-2 border border-green-100 text-center",children:[e.jsx("div",{className:"font-medium text-green-800",children:"Mobile Peak"}),e.jsx("div",{className:"text-green-600 mt-1",children:"7-9 PM"}),e.jsx("div",{className:"text-green-500 mt-1",children:"Personal Time"})]}),e.jsxs("div",{className:"bg-white rounded p-2 border border-green-100 text-center",children:[e.jsx("div",{className:"font-medium text-green-800",children:"Weekend"}),e.jsx("div",{className:"text-green-600 mt-1",children:"10 AM - 2 PM"}),e.jsx("div",{className:"text-green-500 mt-1",children:"Leisure Reading"})]})]}),e.jsx("p",{className:"text-sm text-green-700 mt-2",children:"SMS delivers instantly but timing affects response rates. Avoid early morning (before 8 AM) and late night (after 9 PM) to respect recipient preferences."})]})]})}),e.jsx("div",{className:"bg-gray-50 border rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(c,{className:"h-5 w-5 text-gray-600 mt-0.5"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h5",{className:"font-medium text-gray-900",children:"Quick Templates"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:["ð Special offer: 20% off {service}! Book now: {link} Reply STOP to opt out","Hi {name}! Your appointment is confirmed for {date}. Questions? Call {phone}","â° Limited time: Free consultation available! Claim yours: {link} Text STOP to end","Thanks for your interest! Get {offer} when you book this week: {link}"].map((a,m)=>e.jsxs(p,{variant:"outline",size:"sm",className:"text-left justify-start h-auto p-2 text-xs",onClick:()=>{var j;const l=a.replace("{service}",((j=t==null?void 0:t.services)==null?void 0:j[0])||"our service").replace("{name}","Customer").replace("{date}","tomorrow 2pm").replace("{phone}",g).replace("{link}","book.com/abc").replace("{offer}","50% off");setValue("platformContent.message",l)},children:[a.slice(0,60),"..."]},m))})]})]})})]})]})}export{T as SmsMarketingMockup};
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.