{"version":3,"file":"get-input-offsets.cjs","sources":["../../../../../src/components/Input/InputWrapper/get-input-offsets/get-input-offsets.ts"],"sourcesContent":["export function getInputOffsets(\n  inputWrapperOrder: ('label' | 'input' | 'description' | 'error')[],\n  { hasDescription, hasError }: { hasDescription: boolean; hasError: boolean }\n) {\n  const inputIndex = inputWrapperOrder.findIndex((part) => part === 'input');\n  const aboveInput = inputWrapperOrder.slice(0, inputIndex);\n  const belowInput = inputWrapperOrder.slice(inputIndex + 1);\n  const offsetTop =\n    (hasDescription && aboveInput.includes('description')) ||\n    (hasError && aboveInput.includes('error'));\n  const offsetBottom =\n    (hasDescription && belowInput.includes('description')) ||\n    (hasError && belowInput.includes('error'));\n  return { offsetBottom, offsetTop };\n}\n"],"names":[],"mappings":";;AAAO,SAAS,eACd,CAAA,iBAAA,EACA,EAAE,cAAA,EAAgB,UAClB,EAAA;AACA,EAAA,MAAM,aAAa,iBAAkB,CAAA,SAAA,CAAU,CAAC,IAAA,KAAS,SAAS,OAAO,CAAA;AACzE,EAAA,MAAM,UAAa,GAAA,iBAAA,CAAkB,KAAM,CAAA,CAAA,EAAG,UAAU,CAAA;AACxD,EAAA,MAAM,UAAa,GAAA,iBAAA,CAAkB,KAAM,CAAA,UAAA,GAAa,CAAC,CAAA;AACzD,EAAM,MAAA,SAAA,GACH,kBAAkB,UAAW,CAAA,QAAA,CAAS,aAAa,CACnD,IAAA,QAAA,IAAY,UAAW,CAAA,QAAA,CAAS,OAAO,CAAA;AAC1C,EAAM,MAAA,YAAA,GACH,kBAAkB,UAAW,CAAA,QAAA,CAAS,aAAa,CACnD,IAAA,QAAA,IAAY,UAAW,CAAA,QAAA,CAAS,OAAO,CAAA;AAC1C,EAAO,OAAA,EAAE,cAAc,SAAU,EAAA;AACnC;;;;"}