import{bB as e,bX as t,bw as l,u as s,s as o,l as a,B as i,a$ as n}from"./index.M4bJ7AyN.js";import{u as c,j as r,aE as d,a6 as u,i as p,ap as x,l as v,k as b,aj as m,q as g,g as f,at as h}from"./vue-vendor.CIPxpJKQ.js";const w="/images/icons/icon_chat_photo_lock@2x.png",y={class:"text-white text-center"},k={class:"relative w-full h-[200px] mb-4 rounded-lg overflow-hidden"},$=["src"],_={class:"text-xl font-semibold mb-2"},j={class:"text-gray-400 text-sm mb-4 leading-relaxed"},I={class:"mb-4"},C={class:"inline-flex justify-center items-center px-4 py-2 bg-[rgba(42,42,46,0.6)] rounded-lg border border-[rgba(255,255,255,0.1)]"},U=["src"],D={class:"text-white font-medium text-[20px] ml-2"},B={class:"text-gray-400 text-sm"},V={class:"text-white"},P={class:"flex flex-col px-[20px] pb-[24px] pt-[8px] gap-3"},T={class:"text-red-400 text-sm text-center"},E="dialogPhotoUnlock",M=o(c({name:"DialogPhotoUnlock",__name:"index",props:{visible:{type:Boolean}},emits:["closed"],setup(o,{emit:a}){const i=e(),n=t(),c=l(),M=h(),N=a,O=f(()=>i.photoUnlockData),S=f(()=>{var e;return(null==(e=O.value)?void 0:e.photoUrl)||""}),q=f(()=>{var e;return(null==(e=O.value)?void 0:e.money)||0}),F=f(()=>n.userInfo.diamondCount||0),L=f(()=>c.appConfig.coinIconSrc),X=()=>{i.closePhotoUnlockDialog(),N("closed")},z=()=>{M.push("/rechargeCenter?type=coins"),X()};return(e,t)=>{const l=s;return u(),r(l,{visible:o.visible,onClosed:X,width:400,class:"photo-unlock-dialog-wrapper"},{footer:d(()=>[p("div",P,[p("div",T,m(e.$t(`${E}.insufficientBalance`)),1),p("button",{onClick:z,class:"w-full h-[44px] gradient-bg hover:opacity-80 text-gray-900 font-semibold rounded-[10px] transition-all duration-300"},m(e.$t(`${E}.getMore`)),1)])]),default:d(()=>[p("div",y,[p("div",k,[x(S)?(u(),v("img",{key:0,src:x(S),class:"w-full h-full object-cover blur-xl",alt:"preview"},null,8,$)):b("",!0),t[0]||(t[0]=p("div",{class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30"},[p("div",{class:"w-[48px] h-[48px] mb-2"},[p("img",{src:w,class:"w-full h-full object-contain",alt:"locked"})])],-1))]),p("div",_,m(e.$t(`${E}.title`)),1),p("div",j,m(e.$t(`${E}.desc`)),1),p("div",I,[p("div",C,[p("img",{src:x(L),alt:"diamond",class:"w-[20px] h-[20px] object-cover"},null,8,U),p("span",D,m(x(q)),1)])]),p("div",B,[g(m(e.$t(`${E}.balance`))+": ",1),p("span",V,m(x(F)),1)])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-95abad48"]]),N={class:"text-white text-center"},O={class:"relative w-full h-[200px] mb-4 rounded-lg overflow-hidden"},S=["src"],q={class:"text-xl font-semibold mb-2"},F={class:"text-gray-400 text-sm mb-4 leading-relaxed"},L={class:"mb-4"},X={class:"inline-flex justify-center items-center px-4 py-2 bg-[rgba(42,42,46,0.6)] rounded-lg border border-[rgba(255,255,255,0.1)]"},z=["src"],A={class:"text-white font-medium text-[20px] ml-2"},G={class:"text-gray-400 text-sm"},H={class:"text-white"},J={class:"flex flex-col px-[20px] pb-[24px] pt-[8px] gap-3"},K={class:"text-red-400 text-sm text-center"},Q="dialogVideoUnlock",R=o(c({name:"DialogVideoUnlock",__name:"index",props:{visible:{type:Boolean}},emits:["closed"],setup(o,{emit:a}){const i=e(),n=t(),c=l(),y=h(),k=a,$=f(()=>{var e;return(null==(e=i.videoUnlockData)?void 0:e.coverUrl)||""}),_=f(()=>{var e;return(null==(e=i.videoUnlockData)?void 0:e.money)||0}),j=f(()=>n.userInfo.diamondCount||0),I=f(()=>c.appConfig.coinIconSrc),C=()=>{i.closeVideoUnlockDialog(),k("closed")},U=()=>{y.push("/rechargeCenter?type=coins"),C()};return(e,t)=>{const l=s;return u(),r(l,{visible:o.visible,onClosed:C,width:400,class:"video-unlock-dialog-wrapper"},{footer:d(()=>[p("div",J,[p("div",K,m(e.$t(`${Q}.insufficientBalance`)),1),p("button",{onClick:U,class:"w-full h-[44px] gradient-bg hover:opacity-80 text-gray-900 font-semibold rounded-[10px] transition-all duration-300"},m(e.$t(`${Q}.getMore`)),1)])]),default:d(()=>[p("div",N,[p("div",O,[x($)?(u(),v("img",{key:0,src:x($),class:"w-full h-full object-cover blur-xl",alt:"preview"},null,8,S)):b("",!0),t[0]||(t[0]=p("div",{class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30"},[p("div",{class:"absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium"}," VIDEO "),p("div",{class:"w-[48px] h-[48px] mb-2"},[p("img",{src:w,class:"w-full h-full object-contain",alt:"locked"})])],-1))]),p("div",q,m(e.$t(`${Q}.title`)),1),p("div",F,m(e.$t(`${Q}.desc`)),1),p("div",L,[p("div",X,[p("img",{src:x(I),alt:"diamond",class:"w-[20px] h-[20px] object-cover"},null,8,z),p("span",A,m(x(_)),1)])]),p("div",G,[g(m(e.$t(`${Q}.balance`))+": ",1),p("span",H,m(x(j)),1)])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-0fc25e5e"]]);function W(e,t,l){return function(e){var t,l;const s=e;return Number((null==s?void 0:s.code)??(null==(l=null==(t=null==s?void 0:s.response)?void 0:t.data)?void 0:l.code))===a.NOT_VIP}(e)?t("common.unlockFailed"):t(l)}function Y(){return{toggleLike:async(e,t,l)=>{const s=t?2:1;return await i.botInteract({userId:e,operationType:s}),1===s&&n("like_click",{userId:l??e}),!t},toggleCollect:async(e,t)=>{const l=t?6:5;return await i.botInteract({userId:e,operationType:l}),5===l&&n("collect"),!t}}}export{R as D,M as _,w as a,W as g,Y as u};