import{A as g,a5 as p,c as l,cR as d}from"./index.BdH_oWMm.js";import{c as f}from"./styled-components.jdcyFPSS.js";const I=p("50%{color:rgba(0,0,0,0);}"),$=g("span",{target:"epumps80"})(({includeDot:o,shouldBlink:s,theme:t})=>({...o?{"&::before":{opacity:1,content:'"•"',animation:"none",color:t.colors.grayTextColor,margin:`0 ${t.spacing.twoXS}`}}:{},...s?{color:t.colors.redTextColor,animationName:`${I}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),h=({dirty:o,value:s,inForm:t,maxLength:r,className:m,type:a="single",allowEnterToSubmit:u=!0})=>{const n=[],i=(e,c=!1)=>{n.push(l($,{includeDot:n.length>0,shouldBlink:c,children:e},n.length))};if(u){const e=t?"submit form":"apply";if(a==="multiline"){const c=d()?"⌘":"Ctrl";i(`Press ${c}+Enter to ${e}`)}else a==="single"&&i(`Press Enter to ${e}`)}return r&&(a!=="chat"||o)&&i(`${s.length}/${r}`,o&&s.length>=r),l(f,{"data-testid":"InputInstructions",className:m,children:n})};export{h as I};
