export const getFieldPattern = (allowedSymbols)=>{
    if (!allowedSymbols) {
        return null;
    }
    if (typeof allowedSymbols === 'string') {
        return new RegExp(allowedSymbols, 'g');
    }
    return allowedSymbols;
};
export const getCodeValue = (codeLength, value)=>{
    if (!value.length) {
        return new Array(codeLength).fill('');
    }
    return value.slice(0, codeLength).split('');
};
export const getPlaceholderValue = (codeLength, placeholder)=>{
    if (!placeholder || typeof placeholder !== 'string') {
        return null;
    }
    if (placeholder.length === 1) {
        return Array(codeLength).fill(placeholder);
    }
    return placeholder.slice(0, codeLength).split('');
};
