"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[3685],{53685:function(e,t,s){s.r(t),s.d(t,{default:function(){return C}});var l=s(66252),i=s(49963),a=s(3577),n=s(66732);const o={class:"generalModel_btn"},r=(0,l._)("svg",{width:"46",height:"46",viewBox:"0 0 46 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,l._)("circle",{cx:"23",cy:"23",r:"23",fill:"white","fill-opacity":"0.3"}),(0,l._)("rect",{x:"32.5063",y:"12",width:"3",height:"29",rx:"1.5",transform:"rotate(45 32.5063 12)",fill:"white"}),(0,l._)("rect",{x:"34.6274",y:"32.5059",width:"3",height:"29",rx:"1.5",transform:"rotate(135 34.6274 32.5059)",fill:"white"})],-1),d=[r],c={class:"setBrandDNA_content"},_={class:"modal_title_text"},g=(0,l._)("div",{class:"modal_title_text_intro"},null,-1),u={class:"setBrandDNA_content_bottom"},m={class:"content_bottom_item"},v=["onClick"],w={class:"material_content_list_loding"},h={class:"page_loading"},p={src:n},b={class:"setBrandDNA_ok"};function y(e,t,s,n,r,y){const D=(0,l.up)("a-spin"),N=(0,l.up)("a-modal");return(0,l.wg)(),(0,l.j4)(N,{class:"setBrandDNA_modal generalModel",visible:e.setBrandDNA,"onUpdate:visible":t[3]||(t[3]=t=>e.setBrandDNA=t),footer:null,width:"50%",maskClosable:!1,centered:!0,closable:!1,mask:!0,keyboard:!1,destroyOnClose:!0,zIndex:1e3},{default:(0,l.w5)((()=>[(0,l._)("div",o,[(0,l._)("div",{class:"generalModel_closeIcon",onClick:t[0]||(t[0]=(0,i.iM)((t=>e.cancelDsign()),["stop"]))},d)]),(0,l._)("div",c,[(0,l._)("div",_,[(0,l._)("div",null,(0,a.zw)(e.$t("Habit.Style")),1),g]),(0,l._)("div",u,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.styleList,(t=>((0,l.wg)(),(0,l.iD)("div",m,[(0,l._)("div",{class:(0,a.C_)(["content_bottom_item_border",{active:t.id==e.selectStyle.id}]),onClick:s=>e.setItemSelect(t)},(0,a.zw)(t.brandName),11,v)])))),256)),(0,l.wy)((0,l._)("div",w,[(0,l.wy)((0,l._)("span",h,null,512),[[i.F8,!e.isShowLoading]]),(0,l.wy)((0,l._)("span",null,[(0,l.Wm)(D,{size:"large"})],512),[[i.F8,e.isShowLoading]])],512),[[i.F8,!e.isNoData]]),(0,l.wy)((0,l._)("img",p,null,512),[[i.F8,e.isNoData&&e.isNull]])]),(0,l._)("div",b,[(0,l._)("div",{class:"started_btn",onClick:t[1]||(t[1]=t=>e.setClear())},(0,a.zw)(e.$t("Habit.Clear")),1),(0,l._)("div",{class:"started_btn",onClick:t[2]||(t[2]=t=>e.setOk())}," OK ")])])])),_:1},8,["visible"])}var D=s(2262),N=s(74961),S=s(8552),k=(0,l.aZ)({emits:["setWorkspaceBrandDNA"],props:{},setup(e,{emit:t}){let s=(0,D.iH)(!1),i=(0,D.iH)(!1),a="",n=(0,D.qj)({styleList:[],selectStyle:{name:"",id:""},isNoData:!1,isShowLoading:!1,isNull:!1,page:1,size:10,observer:null});const{t:o}=(0,S.QT)();let r=()=>{let e={page:n.page,size:n.size};n.isShowLoading=!0,N.V.axiosPost(N.V.httpUrls.brandDNAPage,e).then((t=>{1==e.page&&0==t.content.length?n.isNull=!0:n.isNull=!1,t.content.length>0?(n.isNull=!1,n.styleList.push(...t.content)):n.isNoData=!0,n.isShowLoading=!1})).catch((t=>{n.isShowMark=!1,1==e.page&&(n.isNull=!0),n.isNoData=!0}))},d=()=>{n.observer=new IntersectionObserver(((e,t)=>{e[0].intersectionRatio&&(r(),console.log(123),n.page+=1)}))},c=e=>{s.value=!0,a=e.userBrandDna,n.selectStyle.id=e.userBrandDna,(0,l.Y3)((()=>{let e=document.querySelector(".setBrandDNA_modal .material_content_list_loding .page_loading");n.observer.observe(e)}))},_=e=>{n.subPublishDate.coverId=e.designOutfitId,n.selectDate.url=e.url},g=()=>{s.value=!1,n.observer.disconnect()},u=()=>{g()},m=()=>{let e={id:n.selectStyle.id,name:n.selectStyle.name,img:n.selectStyle.img,isRevampModel:!1};a==e.id||t("setWorkspaceBrandDNA",e),g()},v=()=>{n.selectStyle.id="",n.selectStyle.name="",n.selectStyle.img=""},w=e=>{n.selectStyle.id=e.id,n.selectStyle.name=e.brandName,n.selectStyle.img=e.minioUrl};return(0,l.bv)((()=>{n.isShowLoading=!1,n.isNoData=!1,d()})),{setBrandDNA:s,setBrandDNAMask:i,...(0,D.BK)(n),init:c,setCover:_,cancelDsign:u,setItemSelect:w,setOk:m,setClear:v}},data(){return{}},directives:{},mounted(){},methods:{}}),f=s(83744);const B=(0,f.Z)(k,[["render",y]]);var C=B},66732:function(e,t,s){e.exports=s.p+"img/null_img.cdd90213.png"}}]);