import{a as r,j as s,y as x}from"./BulkImageUpload-DGPbX05r.js";import{U as f}from"./User-DMCQU0ZG.js";import{U as j}from"./UserMenu-BCHgG7Y0.js";import h from"./Path-BGQq4Hlj.js";import v from"./ListCard-D4AnmU-5.js";import{P as k}from"./Pagination-C_2iCAT4.js";import{S as n}from"./sweetalert2.all-CGGHY7K6.js";import"./bootstrap.esm-e_F80uXB.js";const P=e=>{const[l,N]=r.useState(e.auth.user.id),[a,c]=r.useState(e.listing.data),[o,g]=r.useState(e.listing.links),m=t=>{n.fire({title:"Are you sure want to Remove?",icon:"warning",showCancelButton:!0,confirmButtonText:"Yes, delete!"}).then(i=>{i.isConfirmed&&x.delete(route("remove-bookmark",t),{onSuccess:()=>{c(d=>d.filter(u=>u.id!=t)),n.fire("Deleted!","Bookmark Removed Successfully","success")},preserveState:!0})})};return s.jsxs(f,{children:[s.jsx(h,{title:"Bookmarks"}),s.jsx("div",{className:"container-fluid user-container",children:s.jsx("div",{className:"container",children:s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col-md-3",children:s.jsx(j,{user:e.auth.user})}),s.jsx("div",{className:"col-md-9",children:s.jsxs("div",{className:"latest-reviews business-listing",children:[a&&a.map((t,i)=>s.jsx(v,{uid:l,list:t,removeListing:m},i)),o.length===3?"":s.jsx("div",{className:"card-footer",children:s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col-md-6 pt-2"}),s.jsx("div",{className:"col-md-6 d-flex justify-content-end",children:s.jsx(k,{links:o})})]})})]})})]})})})]})};export{P as default};
