"use strict";var e=(e,t,a)=>new Promise(((n,o)=>{var r=e=>{try{s(a.next(e))}catch(t){o(t)}},l=e=>{try{s(a.throw(e))}catch(t){o(t)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,l);s((a=a.apply(e,t)).next())}));const t=require("../../common/vendor.js"),a=require("../../utils/commUtils.js"),n=require("../../utils/http.js");if(!Array){(t.resolveComponent("wd-icon")+t.resolveComponent("layout-default-uni"))()}Math||(r+(()=>"../../node-modules/wot-design-uni/components/wd-icon/wd-icon.js")+o)();const o=()=>"../../components/EmptyState.js",r=()=>"../../components/TopBar.js",l={__name:"pet-detail-page",setup(o){const r=t.ref(["全部","心情","养护","清洁"]),l=t.ref("全部"),s=t.ref({}),i=t=>e(this,null,(function*(){try{const e=yield n.httpGet("/petInfo/find_by_id/"+t);200===e.code?s.value=e.data:a.toast(e.data.message)}catch(e){}})),u=()=>{},c=e=>{const t=new Date(e),a=new Date,n=new Date(a.getFullYear(),t.getMonth(),t.getDate());ne(this,null,(function*(){t.id&&(yield i(t.id))})))),(e,n)=>({a:t.unref(a.imgUrl)("@/static/push/bg.png"),b:s.value.profileUrl?t.unref(a.imgUrl)(s.value.profileUrl):t.unref(a.imgUrl)("@/static/icons/cat.png"),c:t.t(s.value.name||"cat"),d:t.p({name:"calendar",size:"20"}),e:t.t(c(s.value.age)),f:t.o((e=>{return t=s.value.id,void a.toPath("/pages/pet/pet-add-page?id="+t);var t})),g:t.o(u),h:t.f(r.value,((e,a,n)=>t.e({a:t.t(e),b:l.value===e},(l.value,{}),{c:e,d:t.n(l.value===e?"text-_a__a_ffc107_a_ relative border-b-2 border-_a__a_ffc107_a_":"text-gray-600"),e:t.o((t=>l.value=e),e)}))),i:t.p({type:"default",message:"暂无内容"})})}},s=t._export_sfc(l,[["__scopeId","data-v-cd52bafd"]]);wx.createPage(s);