1import{a as F}from"./chunk-JM5ZIVJU.js";import{a as z,b as A}from"./chunk-SFLQE3S3.js";import{a as B}from"./chunk-4QSX2ID2.js";import{a as P}from"./chunk-5Z5BMIEK.js";import{b as M}from"./chunk-F7WEC35K.js";import"./chunk-2ZFGFKD3.js";import{c as R}from"./chunk-CCJQNZRA.js";import"./chunk-XI55ZHLP.js";import"./chunk-SPBN5SGA.js";import"./chunk-SQFNQB4W.js";import"./chunk-7UZYWCAJ.js";import"./chunk-CVTPZEQL.js";import"./chunk-M5KMMXMR.js";import"./chunk-VJSDRMDF.js";import"./chunk-A6E4KNWS.js";import"./chunk-BKZ3NTEO.js";import"./chunk-4O3FVBGX.js";import"./chunk-7HOM3374.js";import"./chunk-QEIEQV3T.js";import{c as k,e as j,f as T}from"./chunk-NPEBVN6N.js";import"./chunk-EDKQWKB2.js";import"./chunk-TFMCKN6Q.js";import{sa as D}from"./chunk-K4JYZJ73.js";import{$b as h,Bd as L,F as c,Fc as r,Gc as E,Hc as o,K as x,N as u,Tc as _,Y as b,Yb as d,Zb as t,_a as y,_b as i,db as n,ed as I,id as C,m as p,oc as w,pb as l,wb as S}from"./chunk-6LRC7VF4.js";import{a as f,b as v}from"./chunk-ODN5LVDJ.js";var $=(()=>{class m{constructor(a,s,e,g,U,V){this.hs=a,this.router=s,this.route=e,this.storage=g,this.profileService=U,this.cdr=V,this.progress=0,this.title="",this.coverImage="",this.userType="others",this.isLoading=!1,this.errorMessage="",this.content={others:{text_1:"Confirm and publish",subText_1:"We'll inform you if identify verification or local government registration is needed.",text_2:"Set your calendar",subText_2:"Open your calendar and select the dates you want to keep available...",text_3:"Update your settings",subText_3:"Define house rules, specify how guests can book, and more."}}}ngOnInit(){this.id=this.route.snapshot.paramMap.get("id"),this.progress=this.hs.progress.getValue().progress??0,this.loadListing()}loadListing(){this.isLoading=!0,this.hs.getListingByListingId(this.id).pipe(x(1),b(a=>{this.listingData=a.data?.[0],this.title=this.listingData?.title??"",this.coverImage=this.listingData?.featuredimage??""}),u(()=>{this.isLoading=!1,this.cdr.detectChanges()}),c(a=>(this.handleError("Failed to load listing details",a),p()))).subscribe(()=>{this.cdr.detectChanges()})}onComplete(){if(!this.listingData)return;let a=v(f({},this.listingData),{id:this.id,status:M.LISTED});delete a._id,this.isLoading=!0,this.hs.updateListing(a).pipe(u(()=>{this.isLoading=!1,this.cdr.detectChanges()}),c(s=>{this.handleError("An error occurred during listing completion.",s);let e=s?.error?.message||"An error occurred during listing completion.";return this.storage.showToast("error","Error",e),p()})).subscribe(s=>{s?.success&&this.router.navigate(["/become-a-host/listing-complete"]),this.cdr.detectChanges()})}handleError(a,s){this.errorMessage=a,console.error(a,s)}static{this.\u0275fac=function(s){return new(s||m)(l(P),l(j),l(k),l(R),l(F),l(L))}}static{this.\u0275cmp=S({type:m,selectors:[["app-receipt"]],decls:49,vars:20,consts:[[1,"flex","flex-col","h-full"],[1,"grow","overflow-auto","scroller","flex","h-full","flex-col"],[1,"max-w-7xl","w-full","p-5","mx-auto","my-auto"],[1,"md:text-3xl","text-2xl","fr-semibold","mb-6"],[1,"text-grey_2","!mb-6"],[1,"flex","lg:flex-row","lg:gap-20","flex-col","gap-5","items-center"],[1,"min-w-[350px]","max-w-[40vw]","shadow-theme","rounded-sm","p-4","relative"],["alt","cover_photo",1,"h-[300px]","object-cover","rounded-sm","w-full",3,"src"],[1,"flex","gap-2","justify-between","mt-3","mb-1","items-center"],[1,"f-medium","capitalize","truncate"],[1,"f-medium","whitespace-nowrap"],[1,"flex","flex-col","gap-5"],[1,"text-lg","f-medium"],[1,"flex","gap-4","items-start"],[1,"material-symbols-outlined","text-4xl"],[1,"f-medium","!mb-0"],[1,"text-grey_2"],["styleClass","h-[6px] rounded-none custom-progress-bar",3,"value","showValue"],[1,"p-5","flex","items-center","justify-between","gap-2"],[1,"underline",3,"routerLink"],[1,"livjaza-secondary-btn","!px-6","xs",3,"click","disabled"]],template:function(s,e){s&1&&(t(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),r(4,"Ready to go!"),i(),t(5,"p",4),r(6," Here's a sneak peek of what users will encounter. Feel free to make any necessary adjustments before moving forward. "),i(),t(7,"div",5)(8,"button",6),h(9,"img",7),t(10,"div",8)(11,"span",9),r(12),i(),t(13,"span",10),r(14),I(15,"currency"),i()()(),t(16,"div",11)(17,"p",12),r(18,"What's next?"),i(),t(19,"div",13)(20,"span",14),r(21," inventory "),i(),t(22,"div")(23,"p",15),r(24),i(),t(25,"p",16),r(26),i()()(),t(27,"div",13)(28,"span",14),r(29," calendar_month "),i(),t(30,"div")(31,"p",15),r(32),i(),t(33,"p",16),r(34),i()()(),t(35,"div",13)(36,"span",14),r(37," tune "),i(),t(38,"div")(39,"p",15),r(40),i(),t(41,"p",16),r(42),i()()()()()()(),h(43,"p-progressBar",17),t(44,"div",18)(45,"a",19),r(46," Back "),i(),t(47,"button",20),w("click",function(){return e.onComplete()}),r(48," Publish "),i()()()),s&2&&(n(),d("@slideUp",void 0),n(8),d("src",e.coverImage,y),n(3),E(e.title),n(2),o(" ",C(15,15,e.listingData==null?null:e.listingData.headlineprice,"AED ","symbol","1.0-0"),"/ night "),n(10),o(" ",e.content.others.text_1," "),n(2),o(" ",e.content.others.subText_1," "),n(6),o(" ",e.content.others.text_2," "),n(2),o(" ",e.content.others.subText_2," "),n(6),o(" ",e.content.others.text_3," "),n(2),o(" ",e.content.others.subText_3," "),n(),d("value",e.progress)("showValue",!1),n(2),d("routerLink",_
1("/become-a-host/",e.id,"/house-rules")),n(2),d("disabled",e.isLoading))},dependencies:[A,z,T,D],encapsulation:2,data:{animation:[B]}})}}return m})();export{$ as ReceiptComponent};
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.