""" ... """

import argparse

from secrets_manager.decrypt import decrypt
from secrets_manager.settings import (
    SM_KEYS_PATH,
    SM_KEYS_FILE
)


if __name__ == "__main__":
    """ ... """

    parser = argparse.ArgumentParser()

    parser.add_argument(
        "text",
        help='Text to decode and decrypt.'
    )
    parser.add_argument(
        "--keys-path",
        nargs='?',
        default=SM_KEYS_PATH,
        help='File path for save keys.'
    )
    parser.add_argument(
        "--keys-name",
        nargs='?',
        default=SM_KEYS_FILE,
        help='File name for save keys.'
    )
    
    args = parser.parse_args()

    decrypted_text = decrypt(
        args.text,
        keys_path=args.keys_path,
        keys_name=args.keys_name
    )
    
    print(f"The decrypted message is: {decrypted_text}")