import{d as e,n as t,t as n}from"./objectSpread2-DtFdQpqy.js";import{a as r,n as i}from"./preload-helper-EQ20WQt-.js";import{c as a,d as o,u as s}from"./prop-types-DdDwMzX7.js";import{ct as c,lt as l}from"./poll-DJul990I.js";import{Eo as u,ra as d}from"./time-BE5vfriQ.js";import{t as f}from"./classnames-CFUb2mE1.js";import{t as p}from"./form_field_wrapper-C21yJOSe.js";import{t as m}from"./content_copy-R6StA30R.js";var h=e(r()),g=e(f()),_={input:`_comp_form_fields_text_input__input`,iconWrapper:`_comp_form_fields_text_input__iconWrapper`,icon:`_comp_form_fields_text_input__icon`},v=i();o(),t();var y=[`id`,`label`,`hint`,`status`,`required`,`wrapperClassName`],b=[`type`,`icon`,`className`],x=(0,h.forwardRef)((e,t)=>{let{id:r,label:i,hint:a,status:o,required:c,wrapperClassName:l}=e,u=s(e,y);return(0,v.jsx)(p,{label:i,hint:a,required:c,status:o,inputId:r,className:l,children:e=>(0,v.jsx)(S,n(n(n({},u),e),{},{ref:t}))})});x.displayName=`TextInputField`;var S=(0,h.forwardRef)((e,t)=>{let{type:r=`text`,icon:i,className:a}=e,o=s(e,b);return(0,v.jsx)(C,{icon:i,children:(0,v.jsx)(`input`,n(n({type:r},o),{},{className:(0,g.default)(a,_.input),ref:t}))})});S.displayName=`TextInput`;var C=({icon:e,children:t})=>e?(0,v.jsxs)(`div`,{className:_.iconWrapper,children:[(0,v.jsx)(l,{icon:e,id:`input-icon`,className:_.icon}),t]}):t,w=a({copied:{id:`copy_icon_button.copied`,defaultMessage:`Copied to clipboard`}}),T=({title:e,value:t,className:n,"aria-describedby":r})=>{let[i,a]=(0,h.useState)(!1),o=u(),s=(0,h.useCallback)(()=>{navigator.clipboard.writeText(t),a(!0),o(d({message:w.copied})),setTimeout(()=>{a(!1)},700)},[a,t,o]);return(0,v.jsx)(c,{className:(0,g.default)(n,i?`copied`:`copyable`),title:e,onClick:s,icon:`copy-icon`,iconComponent:m,"aria-describedby":r})};export{_ as i,S as n,x as r,T as t};
//# sourceMappingURL=copy_icon_button-8MijH-6b.js.map