1import{c as S,p as D,a as r,b as v,d as s,h as M,w as h,e as t,l as C,k as f,f as y,s as d,v as m,g as n,t as i,F as u,i as b,D as c,n as _,j as q,x as G,z as L}from"./app-xr8sGINd.js";import{A as R}from"./AuthenticatedLayout-DPf-2RT6.js";import{A as W}from"./arrow-left-2Zk1lGFh.js";import{U as Y}from"./users-BXuiq4oz.js";import{U as K}from"./user-B4P1aJh3.js";import{U as j}from"./user-round-CWpdNkoD.js";/* empty css */import"./createLucideIcon-aO0BUlau.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./x-470fUoLl.js";import"./flame-Sn85dBu0.js";import"./check-qIgxkdv3.js";const z={class:"min-h-screen bg-[#050B14] py-8 px-4"},H={class:"max-w-2xl mx-auto space-y-6"},J={class:"rounded-2xl border border-white/10 bg-white/5 p-6 space-y-4"},Q={key:0,class:"text-xs text-red-400 mt-1"},X=["value"],Z={key:0},ee={class:"rounded-2xl border border-white/10 bg-white/5 p-6"},te={class:"grid grid-cols-3 gap-2"},le=["onClick"],oe={class:"text-sm font-bold"},se={key:0,class:"text-xs text-amber-400 mt-2"},ae={class:"rounded-2xl border border-white/10 bg-white/5 p-6 space-y-4"},ne={class:"text-sm text-slate-400"},re={key:0},ie=["value"],de={key:1},ue=["value"],be={class:"block text-sm font-semibold text-slate-200 mb-2"},pe={value:""},ce=["value"],xe={class:"rounded-2xl border border-white/10 bg-white/5 p-6 space-y-4"},ve={class:"space-y-2"},me=["onClick"],ge={class:"text-sm font-bold text-white"},he={class:"text-xs text-slate-400"},fe=["value"],ye=["value"],_e={class:"rounded-2xl border border-white/10 bg-white/5 p-6 space-y-4"},ke={class:"grid grid-cols-2 sm:grid-cols-4 gap-2"},we=["onClick"],Se={class:"flex items-center gap-3 cursor-pointer"},Ce={class:"flex items-center gap-3 pb-8"},Be=["disabled"],Me={__name:"Edit",props:{cabinShare:Object},setup(x){const a=x,B=[{value:"split_cost",label:"Split cost (save money)"},{value:"solo_roommate",label:"Solo cruiser looking for a roommate"},{value:"extra_space",label:"Have extra space, cabin already booked"},{value:"open",label:"Just looking to share"},{value:"other",label:"Other (tell us)"}],F=[{value:"under_500",label:"Under $500"},{value:"500_1000",label:"$500 â $1,000"},{value:"1000_2000",label:"$1,000 â $2,000"},{value:"2000_plus",label:"$2,000+"},{value:"flexible",label:"Flexible"}],U=[{value:"18_25",label:"18 â 25"},{value:"25_35",label:"25 â 35"},{value:"35_45",label:"35 â 45"},{value:"45_55",label:"45 â 55"},{value:"55_plus",label:"55+"},{value:"any",label:"No preference"}],N=[{value:"interior",label:"Interior"},{value:"ocean_view",label:"Ocean View"},{value:"balcony",label:"Balcony"},{value:"suite",label:"Suite"},{value:"any",label:"No preference"}],V=[{value:"non_smoker",label:"Non-smoker only"},{value:"smoker_ok",label:"Smoker OK"},{value:"no_preference",label:"No preference"}],A=[{value:"couples",label:"Couples",icon:Y},{value:"men",label:"Men",icon:K},{value:"women",label:"Women",icon:j}],E=[{value:"50_50",label:"50/50 â split it evenly"},{value:"they_pay_more",label:"They pay more than half"},{value:"i_pay_more",label:"I'll cover more than half"},{value:"negotiable",label:"Negotiable â let's talk"}],O=[{value:"quiet",label:"Early nights",hint:"In by midnight, up for breakfast"},{value:"social",label:"Social",hint:"Out late some nights, not every night"},{value:"night_owl",label:"Night owl",hint:"Closing down the bar, sleeping in"}],T=[{value:"excursions",label:"Excursions"},{value:"spa",label:"Spa"},{value:"casino",label:"Casino"},{value:"shows",label:"Shows"},{value:"dining",label:"Dining"},{value:"pool",label:"Pool deck"},{value:"beach",label:"Beach days"},{value:"fitness",label:"Fitness"}],g=S(()=>a.cabinShare.category==="booked"),o=D({title:a.cabinShare.title??"",description:a.cabinShare.description??"",reason:a.cabinShare.reason??"",reason_other:a.cabinShare.reason_other??"",seeking_genders:Array.isArray(a.cabinShare.seeking_genders)?[...a.cabinShare.seeking_genders]:[],budget_range:a.cabinShare.budget_range??"",cost_split:a.cabinShare.cost_split??"",room_type:a.cabinShare.room_type??"",age_range:a.cabinShare.age_range??"",smoking:a.cabinShare.smoking??"",cabin_vibe:a.cabinShare.cabin_vibe??"",interested_in_activities:Array.isArray(a.cabinShare.interested_in_activities)?[...a.cabinShare.interested_in_activities]:[],additional_requirements:a.cabinShare.additional_requirements??"",sailing_dates_note:a.cabinShare.sailing_dates_note??"",is_nsfw:!!a.cabinShare.is_nsfw}),I=p=>{const e=o.seeking_genders.indexOf(p);e===-1?o.seeking_genders.push(p):o.seeking_genders.splice(e,1)},P=p=>{const e=o.interested_in_activities.indexOf(p);e===-1?o.interested_in_activities.push(p):o.interested_in_activities.splice(e,1)},k=S(()=>!!o.title.trim()&&!!o.reason&&(o.reason!=="other"||!!o.reason_other.trim())&&o.seeking_genders.length>=1),$=()=>{!k.value||o.processing||o.patch(route("cabinshare.update",a.cabinShare.id),{preserveScroll:!0})};return(p,e)=>(n(),r(u,null,[v(s(M),{title:"Edit CabinShare"}),v(R,null,{default:h(()=>[t("div",z,[t("div",H,[v(s(C),{href:p.route("cabinshare.show",x.
1cabinShare.slug||x.cabinShare.id),class:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-[#3C8BF5] transition"},{default:h(()=>[v(s(W),{class:"w-4 h-4"}),e[12]||(e[12]=f(" Back to your post ",-1))]),_:1},8,["href"]),e[35]||(e[35]=t("div",null,[t("h1",{class:"text-3xl font-black text-white"},"Edit your CabinShare"),t("p",{class:"text-sm text-slate-400 mt-1"}," Your sailing and photos stay as they are â this updates the details people read. ")],-1)),t("div",J,[t("div",null,[e[13]||(e[13]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Title",-1)),d(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>s(o).title=l),type:"text",maxlength:"120",class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-[#3C8BF5] focus:ring-1 focus:ring-[#3C8BF5] outline-none"},null,512),[[m,s(o).title]]),s(o).errors.title?(n(),r("p",Q,i(s(o).errors.title),1)):y("",!0)]),t("div",null,[e[14]||(e[14]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Description",-1)),d(t("textarea",{"onUpdate:modelValue":e[1]||(e[1]=l=>s(o).description=l),rows:"4",maxlength:"2000",class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-[#3C8BF5] focus:ring-1 focus:ring-[#3C8BF5] outline-none"},null,512),[[m,s(o).description]])]),t("div",null,[e[16]||(e[16]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Why are you sharing?",-1)),d(t("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>s(o).reason=l),class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white"},[e[15]||(e[15]=t("option",{value:""},"Choose oneâ¦",-1)),(n(),r(u,null,b(B,l=>t("option",{key:l.value,value:l.value},i(l.label),9,X)),64))],512),[[c,s(o).reason]])]),s(o).reason==="other"?(n(),r("div",Z,[e[17]||(e[17]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Tell us more",-1)),d(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>s(o).reason_other=l),type:"text",maxlength:"120",class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-[#3C8BF5] focus:ring-1 focus:ring-[#3C8BF5] outline-none"},null,512),[[m,s(o).reason_other]])])):y("",!0)]),t("div",ee,[e[18]||(e[18]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},[f(" Open to "),t("span",{class:"text-[#3C8BF5]"},"*"),t("span",{class:"text-xs font-normal text-slate-400 ml-1"},"shows on your card")],-1)),t("div",te,[(n(),r(u,null,b(A,l=>t("button",{key:l.value,type:"button",onClick:w=>I(l.value),class:_(["py-4 rounded-xl border-2 transition flex flex-col items-center gap-1",s(o).seeking_genders.includes(l.value)?"bg-[#3C8BF5]/15 border-[#3C8BF5] text-white":"bg-slate-900 border-slate-700 text-slate-400 hover:border-slate-600"])},[(n(),q(G(l.icon),{class:"w-6 h-6"})),t("span",oe,i(l.label),1)],10,le)),64))]),s(o).seeking_genders.length?y("",!0):(n(),r("p",se," Pick at least one. "))]),t("div",ae,[t("div",null,[e[19]||(e[19]=t("h2",{class:"text-lg font-bold text-white"},"The cabin",-1)),t("p",ne,i(g.value?"You've booked it â what would the other person contribute?":"Nothing booked yet â what are you looking to spend?"),1)]),g.value?(n(),r("div",re,[e[21]||(e[21]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Cost split",-1)),d(t("select",{"onUpdate:modelValue":e[4]||(e[4]=l=>s(o).cost_split=l),class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white"},[e[20]||(e[20]=t("option",{value:""},"Prefer not to say",-1)),(n(),r(u,null,b(E,l=>t("option",{key:l.value,value:l.value},i(l.label),9,ie)),64))],512),[[c,s(o).cost_split]])])):(n(),r("div",de,[e[23]||(e[23]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Budget per person",-1)),d(t("select",{"onUpdate:modelValue":e[5]||(e[5]=l=>s(o).budget_range=l),class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white"},[e[22]||(e[22]=t("option",{value:""},"Prefer not to say",-1)),(n(),r(u,null,b(F,l=>t("option",{key:l.value,value:l.value},i(l.label),9,ue)),64))],512),[[c,s(o).budget_range]])])),t("div",null,[t("label",be,i(g.value?"Cabin type (what you booked)":"Cabin type you want"),1),d(t("select",{"onUpdate:modelValue":e[6]||(e[6]=l=>s(o).room_type=l),class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white"},[t("option",pe,i(g.value?"Prefer not to say":"No preference"),1),(n(),r(u,null,b(N,l=>t("option",{key:l.value,value:l.value}
1,i(l.label),9,ce)),64))],512),[[c,s(o).room_type]])])]),t("div",xe,[e[29]||(e[29]=t("h2",{class:"text-lg font-bold text-white"},"Living together",-1)),t("div",null,[e[24]||(e[24]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Your cabin routine",-1)),t("div",ve,[(n(),r(u,null,b(O,l=>t("button",{key:l.value,type:"button",onClick:w=>s(o).cabin_vibe=s(o).cabin_vibe===l.value?"":l.value,class:_(["w-full text-left px-4 py-3 rounded-xl border-2 transition",s(o).cabin_vibe===l.value?"bg-[#3C8BF5]/15 border-[#3C8BF5]":"bg-slate-900 border-slate-700 hover:border-slate-600"])},[t("div",ge,i(l.label),1),t("div",he,i(l.hint),1)],10,me)),64))])]),t("div",null,[e[26]||(e[26]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Smoking",-1)),d(t("select",{"onUpdate:modelValue":e[7]||(e[7]=l=>s(o).smoking=l),class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white"},[e[25]||(e[25]=t("option",{value:""},"Prefer not to say",-1)),(n(),r(u,null,b(V,l=>t("option",{key:l.value,value:l.value},i(l.label),9,fe)),64))],512),[[c,s(o).smoking]])]),t("div",null,[e[28]||(e[28]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Age range you'd prefer",-1)),d(t("select",{"onUpdate:modelValue":e[8]||(e[8]=l=>s(o).age_range=l),class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white"},[e[27]||(e[27]=t("option",{value:""},"Prefer not to say",-1)),(n(),r(u,null,b(U,l=>t("option",{key:l.value,value:l.value},i(l.label),9,ye)),64))],512),[[c,s(o).age_range]])])]),t("div",_e,[t("div",null,[e[30]||(e[30]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"What are you up for onboard?",-1)),t("div",ke,[(n(),r(u,null,b(T,l=>t("button",{key:l.value,type:"button",onClick:w=>P(l.value),class:_(["py-3 px-2 rounded-xl border-2 transition text-xs font-semibold",s(o).interested_in_activities.includes(l.value)?"bg-[#3C8BF5]/15 border-[#3C8BF5] text-white":"bg-slate-900 border-slate-700 text-slate-400 hover:border-slate-600"])},i(l.label),11,we)),64))])]),t("div",null,[e[31]||(e[31]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Anything else you're looking for?",-1)),d(t("textarea",{"onUpdate:modelValue":e[9]||(e[9]=l=>s(o).additional_requirements=l),rows:"3",maxlength:"1000",placeholder:"e.g. Early riser, happy to split excursions, prefer a non-smokerâ¦",class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-[#3C8BF5] focus:ring-1 focus:ring-[#3C8BF5] outline-none"},null,512),[[m,s(o).additional_requirements]])]),t("div",null,[e[32]||(e[32]=t("label",{class:"block text-sm font-semibold text-slate-200 mb-2"},"Notes on dates",-1)),d(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=l=>s(o).sailing_dates_note=l),rows:"2",maxlength:"500",class:"w-full bg-slate-900 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-[#3C8BF5] focus:ring-1 focus:ring-[#3C8BF5] outline-none"},null,512),[[m,s(o).sailing_dates_note]])]),t("label",Se,[d(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>s(o).is_nsfw=l),type:"checkbox",class:"w-5 h-5 rounded bg-slate-900 border-slate-700 text-[#3C8BF5] focus:ring-[#3C8BF5]"},null,512),[[L,s(o).is_nsfw]]),e[33]||(e[33]=t("span",{class:"text-sm text-slate-200"},"Mark this post as adult (NSFW)",-1))])]),t("div",Ce,[t("button",{type:"button",onClick:$,disabled:!k.value||s(o).processing,class:"flex-1 py-4 rounded-xl bg-[#3C8BF5] text-slate-950 font-black hover:bg-[#12C4B8] transition disabled:opacity-40 disabled:cursor-not-allowed"},i(s(o).processing?"Savingâ¦":"Save changes"),9,Be),v(s(C),{href:p.route("cabinshare.show",x.cabinShare.slug||x.cabinShare.id),class:"px-6 py-4 rounded-xl border border-slate-700 text-slate-300 font-bold hover:border-slate-600 transition"},{default:h(()=>[...e[34]||(e[34]=[f(" Cancel ",-1)])]),_:1},8,["href"])])])])]),_:1})],64))}};export{Me 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.