"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@ant-design/icons-vue");require("../../../../config-provider/index.js");const a=require("../../helper.js"),d=require("../../hooks/use-descriptions-context.js"),p=require("../../../../config-provider/hooks/use-namespace.js"),y=e.defineComponent({__name:"index",props:{item:{},data:{},defaultMask:{}},setup(c){const o=c,s=e.computed(()=>a.getMaskConfigBySchema(o.item,o.defaultMask)),{maskStatus:l,setStatusByKey:u}=d.useDescriptionsInject()||{},{e:i}=p.useNamespace("ap-descriptions"),n=e.computed(()=>{const t=a.getSchemaKey(o.item);return t&&l?.value[t]}),k=e.computed(()=>s.value?.renderMask?s.value?.renderMask({record:o.data||{}}):"****"),m=()=>{const t=a.getSchemaKey(o.item);t&&u?.(t,!n.value)};return(t,f)=>s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[k.value])),{key:1})):e.renderSlot(t.$slots,"default",{key:0}),s.value.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(i)("mask-wrapper")),onClick:e.withModifiers(m,["stop"])},[n.value?(e.openBlock(),e.createBlock(e.unref(r.EyeInvisibleOutlined),{key:0})):(e.openBlock(),e.createBlock(e.unref(r.EyeOutlined),{key:1}))],2))],64)):e.renderSlot(t.$slots,"default",{key:1})}});exports.default=y;
