import{_ as b,k as _,a as p,J as v,m as k,c as i,e as o,h as g,F as c,i as m,t as E,w as C,b as u,o as n}from"./app-CgV11GBz.js";import{E as S,c as x}from"./index-CJx7RGCD.js";import{B as A}from"./useFlexGapSupport-CWWB0EO1.js";const B={name:"SalaryVisibility",components:{EyeOutlined:x,EyeInvisibleOutlined:S},props:{salary:{type:[Number,String],default:null},formatAmountCurrency:{type:Function,default:e=>e},visibleAll:{type:Boolean,default:!1}},setup(e){const l=_(!1),{formatAmountCurrency:a}=p(),t=()=>{l.value=!l.value},s=v(()=>e.salary==null?"-":a(e.salary));return k(()=>e.visibleAll,r=>{r&&(l.value=!1)}),{visible:l,toggleVisible:t,formattedSalary:s}}};function O(e,l,a,t,s,r){const y=u("EyeOutlined"),f=u("EyeInvisibleOutlined"),d=A;return n(),i("span",null,[a.visibleAll||t.visible?(n(),i(c,{key:0},[m(E(t.formattedSalary),1)],64)):(n(),i(c,{key:1},[m(" **** ")],64)),a.visibleAll?g("",!0):(n(),o(d,{key:2,type:"link",onClick:t.toggleVisible,style:{padding:"0","margin-left":"4px"}},{icon:C(()=>[t.visible?(n(),o(y,{key:0})):(n(),o(f,{key:1}))]),_:1},8,["onClick"]))])}const F=b(B,[["render",O]]);export{F as S};
