"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[5088],{45088:(e,t,i)=>{i.r(t),i.d(t,{default:()=>b});var n=i(22406),l=i(94630),o=i(62951),c=i(57268),s=i(94209),a=i(29445),r=i(63931),d=i(20399);const p={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]"},u={class:"text-dot flex items-center"},x={class:"text-dot pl-[10px] text-[14px] text-color-t2"},h={class:"flex items-center"},m=(0,c.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 m=e,b=(0,r.R)(),v=(0,a.iH)(!1),_=(0,a.iH)(m.icon.id===b.currentId?{edit:{text:"编辑",handler(){i("edit",(0,d.Z)(m.icon))}}}:{edit:{text:"编辑",handler(){i("edit",(0,d.Z)(m.icon))}},remove:{text:"删除",handler(){i("delete",m.icon.id)}}}),k=()=>{b.currentIdList.includes(m.icon.id)?b.deleteCurrentListItem(m.icon.id):b.addCurrentListItem(m.icon.id)};return(e,t)=>{const i=o.Z,r=l.Z,d=n.Z;return(0,c.wg)(),(0,c.iD)("div",p,[(0,c._)("div",u,[(0,c.Wm)(i,{"max-size":24,icon:m.icon,class:"h-[24px] w-[24px] flex-shrink-0 rounded-[6px]"},null,8,["icon"]),(0,c._)("span",x,(0,s.toDisplayString)(m.icon.name),1)]),(0,c._)("div",h,[m.editable?((0,c.wg)(),(0,c.j4)(r,{key:0,show:v.value,"onUpdate:show":t[0]||(t[0]=e=>v.value=e),options:(0,a.SU)(_)},{reference:(0,c.w5)((()=>[(0,c._)("button",{class:(0,s.normalizeClass)(v.value?"block":"hidden group-hover:block")},[(0,c._)("i",{class:(0,s.normalizeClass)([v.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,c.kq)("",!0),m.checkable?((0,c.wg)(),(0,c.j4)(d,{key:1,value:(0,a.SU)(b).currentIdList.includes(m.icon.id),class:"ml-[12px]",title:"是否添加到主页去",onClick:k},null,8,["value","title"])):(0,c.kq)("",!0)])])}}});const b=(0,i(76911).Z)(m,[["__scopeId","data-v-0301562c"]])}}]);