'use client'; import React,{ useRef, useEffect, useImperativeHandle, useState, forwardRef, DetailedHTMLProps, HTMLAttributes } from 'react'; import 'jb-mobile-input'; import {BaseProps, type Props as JBInputProps, useJBInputAttribute, useJBInputEvents} from 'jb-input/react'; // eslint-disable-next-line no-duplicate-imports import { type JBMobileInputWebComponent } from 'jb-mobile-input'; interface JBMobileInputType extends DetailedHTMLProps, JBMobileInputWebComponent> { class?:string, } declare module "react" { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { 'jb-mobile-input': JBMobileInputType; } } } // eslint-disable-next-line react/display-name export const JBMobileInput = forwardRef((props:Props, ref) => { const element = useRef(null); useImperativeHandle( ref, () => (element ? element.current : undefined), [element], ); useJBInputAttribute(element,props); useJBInputEvents(element,props); return( {props.children} ); }); export type Props = BaseProps & { // add special props here } JBMobileInput.displayName = "JBMobileInput";