"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[5142,5088],{43691:(e,t,i)=>{i.d(t,{Z:()=>u});var l=i(13151),s=i(57268),o=i(29445),a=i(94209),n=i(1585),c=i(13197),d=i(50344);const u=(0,s.aZ)({__name:"hi-sidebar",props:{show:{type:Boolean},width:{default:400}},emits:["update:show"],setup(e,t){let{emit:i}=t;const u=e,r=(0,s.Fl)({get:()=>u.show,set(e){i("update:show",e)}}),p=(0,o.iH)(u.width);return(0,c.C)((0,d.uniqueId)("hi-sidebar"),(e=>{e<n.qf?p.value=e:p.value=u.width}),!0)(),(e,t)=>{const i=l.Z;return(0,s.wg)(),(0,s.j4)(i,{show:(0,o.SU)(r),"onUpdate:show":t[0]||(t[0]=e=>(0,o.dq)(r)?r.value=e:null),ani:"slide-left",class:"inset-y-0 left-0 bg-color-m1 bg-opacity-80 pt-[32px] shadow-side-bar backdrop-blur-[40px]",width:p.value},{default:(0,s.w5)((()=>[(0,s._)("div",{class:"h-full",style:(0,a.normalizeStyle)({width:p.value+"px"})},[(0,s.WI)(e.$slots,"default")],4)])),_:3},8,["show","width"])}}})},25142:(e,t,i)=>{i.r(t),i.d(t,{default:()=>v});var l=i(43691),s=i(24099),o=i(13234),a=i(57268),n=i(29445),c=i(94209),d=i(45088),u=i(63931),r=i(10435),p=i(96073),h=i(63477);const m={id:"search-custom",class:"pb-[20px]"},v=(0,a.aZ)({__name:"search-custom",setup(e){const t=(0,u.R)(),{customList:i}=(0,r.Jk)(t),v=(0,n.iH)(null),w=(0,n.iH)(!1),x=()=>{w.value=!0,v.value=null},b=e=>{w.value=!0,v.value=e},f=e=>{t.saveCustomListItem(e,"custom"),w.value=!1,e.id?p.f.sendEvent("edit-custom-search",e.bgType,(0,h.Si)(e.target)):p.f.sendEvent("add-custom-search",e.bgType,(0,h.Si)(e.target))},y=e=>{t.deleteCustomListItem(e,"custom")};return(e,t)=>{const u=o.Z,r=s.Z,p=l.Z;return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",m,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)((0,n.SU)(i),(e=>((0,a.wg)(),(0,a.j4)(d.default,{key:e.id,icon:e,editable:!0,onEdit:b,onDelete:y},null,8,["icon"])))),128)),(0,a.Wm)(u,{type:"primary",plain:"",size:"block",class:"h-[35px] text-[14px]",onClick:x},{default:(0,a.w5)((()=>[(0,a.Uk)((0,c.toDisplayString)("添加"),1)])),_:1})]),(0,a.Wm)(p,{show:w.value,"onUpdate:show":t[1]||(t[1]=e=>w.value=e)},{default:(0,a.w5)((()=>[(0,a.Wm)(r,{type:"search",title:"自定义添加",icon:v.value,show:w.value,onBack:t[0]||(t[0]=e=>w.value=!1),onOnSuccess:f},null,8,["title","icon","show"])])),_:1},8,["show"])],64)}}})},45088:(e,t,i)=>{i.r(t),i.d(t,{default:()=>w});var l=i(22406),s=i(94630),o=i(62951),a=i(57268),n=i(94209),c=i(29445),d=i(63931),u=i(20399);const r={class:"search-list-item group mb-[8px] flex w-[360px] items-center justify-between rounded-[6px] px-[10px] py-[8px] duration-150 hover:bg-color-m2 hover:bg-opacity-[0.06]"},p={class:"text-dot flex items-center"},h={class:"text-dot pl-[10px] text-[14px] text-color-t2"},m={class:"flex items-center"},v=(0,a.aZ)({__name:"search-list-item",props:{icon:null,editable:{type:Boolean,default:!0},checkable:{type:Boolean,default:!0}},emits:["edit","delete"],setup(e,t){let{emit:i}=t;const v=e,w=(0,d.R)(),x=(0,c.iH)(!1),b=(0,c.iH)(v.icon.id===w.currentId?{edit:{text:"编辑",handler(){i("edit",(0,u.Z)(v.icon))}}}:{edit:{text:"编辑",handler(){i("edit",(0,u.Z)(v.icon))}},remove:{text:"删除",handler(){i("delete",v.icon.id)}}}),f=()=>{w.currentIdList.includes(v.icon.id)?w.deleteCurrentListItem(v.icon.id):w.addCurrentListItem(v.icon.id)};return(e,t)=>{const i=o.Z,d=s.Z,u=l.Z;return(0,a.wg)(),(0,a.iD)("div",r,[(0,a._)("div",p,[(0,a.Wm)(i,{"max-size":24,icon:v.icon,class:"h-[24px] w-[24px] flex-shrink-0 rounded-[6px]"},null,8,["icon"]),(0,a._)("span",h,(0,n.toDisplayString)(v.icon.name),1)]),(0,a._)("div",m,[v.editable?((0,a.wg)(),(0,a.j4)(d,{key:0,show:x.value,"onUpdate:show":t[0]||(t[0]=e=>x.value=e),options:(0,c.SU)(b)},{reference:(0,a.w5)((()=>[(0,a._)("button",{class:(0,n.normalizeClass)(x.value?"block":"hidden group-hover:block")},[(0,a._)("i",{class:(0,n.normalizeClass)([x.value?"text-opacity-80":"text-opacity-60 hover:text-opacity-80 ","iconfont icon-single_hover_icon text-[20px] text-color-t1"])},null,2)],2)])),_:1},8,["show","options"])):(0,a.kq)("",!0),v.checkable?((0,a.wg)(),(0,a.j4)(u,{key:1,value:(0,c.SU)(w).currentIdList.includes(v.icon.id),class:"ml-[12px]",title:"是否添加到主页去",onClick:f},null,8,["value","title"])):(0,a.kq)("",!0)])])}}});const w=(0,i(76911).Z)(v,[["__scopeId","data-v-0301562c"]])}}]);