\n {userData &&\n !userData.is_admin &&\n userCredits.credits === 0 &&\n userCredits?.yt_credits === 0 ? (\n
\n
\n
\n Event Credits: {userCredits.credits}\n
\n\n
\n YoutTube Credits: {userCredits.yt_credits}\n
\n
\n
\n Plase Maintain Suffuient Credits\n
\n
\n ) : (\n <>\n {!mailVerificationFromREsponse && (\n
\n
\n {\n setInputMail(e.target.value);\n }}\n />\n\n \n
\n {verifiedMail.length !== 0 && (\n
Recent Verified Mails
\n )}\n
\n {Array.isArray(verifiedMail) && verifiedMail.length > 0 ? (\n verifiedMail.map((eachMail) => {\n if (userData && eachMail.email !== userData.email) {\n return (\n - \n \n \n
\n );\n }\n return null; // Return null if condition is not met to avoid undefined.\n })\n ) : (\n No Recent Data
\n )}\n
\n\n {userData && userData.email.trim(\" \") === inputMail && (\n
\n Your can't transfer to your self.\n \n )}\n
\n )}\n\n {mailVerificationFromREsponse && (\n <>\n
\n
\n Reciver Details\n
\n \n
\n {veriedUserdetails &&\n sendCreditMode === send.selectionMode &&\n `${veriedUserdetails.first_name} ${veriedUserdetails.last_name}`}\n\n {userDetailsfromStoredDetails &&\n sendCreditMode === send.storedMode &&\n `${userDetailsfromStoredDetails[0].first_name} ${userDetailsfromStoredDetails[0].last_name}`}\n\n {receiverDetailsOne?.length > 0 &&\n sendCreditMode === send.verificationMode &&\n `${receiverDetailsOne[0].first_name} ${receiverDetailsOne[0].last_name}`}\n \n
\n
\n {veriedUserdetails &&\n sendCreditMode === send.selectionMode &&\n veriedUserdetails.email}\n\n {userDetailsfromStoredDetails &&\n sendCreditMode === send.storedMode &&\n userDetailsfromStoredDetails[0].email}\n\n {receiverDetailsOne?.length > 0 &&\n sendCreditMode === send.verificationMode &&\n receiverDetailsOne[0].email}\n \n
\n
\n {veriedUserdetails &&\n sendCreditMode === send.selectionMode &&\n veriedUserdetails.phone_number}\n\n {userDetailsfromStoredDetails &&\n sendCreditMode === send.storedMode &&\n userDetailsfromStoredDetails[0].phone_number}\n\n {receiverDetailsOne?.length > 0 &&\n sendCreditMode === send.verificationMode &&\n receiverDetailsOne[0].phone_number}\n \n\n
\n\n {/* Table with credit types */}\n
\n \n \n \n \n Credit Type\n \n \n Enter Quantity\n \n \n \n \n {(userCredits?.credits >= 1 ||\n (userData && userData?.is_admin)) && (\n \n Event Credits\n \n {\n const inputValue = e.target.value;\n if (!userData.is_admin) {\n if (inputValue > userCredits.credits) {\n setSendCredit({\n ...sendCredit,\n eventCreditCount: userCredits.credits,\n });\n toast.error(\n \"Events Input value should be less than available\"\n );\n } else {\n setSendCredit({\n ...sendCredit,\n eventCreditCount: inputValue,\n });\n }\n } else {\n // Admin can set any value\n setSendCredit({\n ...sendCredit,\n eventCreditCount: inputValue,\n });\n }\n }}\n variant=\"outlined\"\n size=\"small\"\n inputProps={{\n min: !userData.is_admin ? 0 : 1,\n max: !userData.is_admin\n ? userCredits.credits\n : undefined, // No max limit for admin\n }}\n sx={{\n width: \"100px !important\",\n marginTop: \"3px\",\n }}\n />\n {!userData?.is_admin && (\n \n Avl: {userCredits.credits}\n
\n )}\n \n \n )}\n\n {/* {(userCredits?.vid_credits >= 1 ||\n (userData && userData?.is_admin)) && (\n \n \n Recording Video Credits\n \n \n {\n const inputValue = e.target.value;\n if (!userData.is_admin) {\n if (inputValue > userCredits.vid_credits) {\n setSendCredit({\n ...sendCredit,\n recVideoCreditCount:\n userCredits.vid_credits,\n });\n toast.error(\n \"Events Input value should be less than available\"\n );\n } else {\n setSendCredit({\n ...sendCredit,\n recVideoCreditCount: inputValue,\n });\n }\n } else {\n // Admin can set any value\n setSendCredit({\n ...sendCredit,\n recVideoCreditCount: inputValue,\n });\n }\n }}\n variant=\"outlined\"\n size=\"small\"\n inputProps={{\n min: !userData.is_admin\n ? sendCredit.eventCreditCount > 0\n ? 0\n : 1\n : 0,\n max: !userData.is_admin\n ? userCredits.vid_credits\n : undefined, // No max limit for admin\n }}\n sx={{\n width: \"100px !important\",\n marginTop: \"3px\",\n }}\n />\n {!userData?.is_admin && (\n \n Avl: {userCredits.vid_credits}\n
\n )}\n \n \n )} */}\n\n {(userCredits?.yt_credits >= 1 ||\n (userData && userData?.is_admin)) && (\n \n \n YouTube Credits\n \n \n {\n const inputValue = e.target.value;\n if (!userData.is_admin) {\n if (inputValue > userCredits.yt_credits) {\n setSendCredit({\n ...sendCredit,\n yt_credit_count: userCredits.yt_credits,\n });\n toast.error(\n \"Events Input value should be less than available\"\n );\n } else {\n setSendCredit({\n ...sendCredit,\n yt_credit_count: inputValue,\n });\n }\n } else {\n // Admin can set any value\n setSendCredit({\n ...sendCredit,\n yt_credit_count: inputValue,\n });\n }\n }}\n variant=\"outlined\"\n size=\"small\"\n inputProps={{\n min: !userData.is_admin\n ? sendCredit.yt_credit_count > 0\n ? 0\n : 1\n : 0,\n max: !userData.is_admin\n ? userCredits.yt_credits\n : undefined, // No max limit for admin\n }}\n sx={{\n width: \"100px !important\",\n marginTop: \"3px\",\n }}\n />\n {!userData?.is_admin && (\n \n Avl: {userCredits.yt_credits}\n
\n )}\n \n \n )}\n \n
\n \n\n {/* Action Buttons */}\n
\n \n
\n >\n )}\n >\n )}\n
\n