{
    "Amplify Manual Storage Configuration": {
        "prefix": "Storage:",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "Storage: {",
            "\tbucket: ${1:''}, // REQUIRED - Amazon  S3 bucket",
            "\tregion: ${2:'XX-XXXX-X'} // OPTIONAL - Amazon service region",
            "}"
        ]
    },
    "Manual Storage Configuration": {
        "prefix": "Storage.configure",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "Storage.configure({",
                "\tbucket: // Your bucket ARN;",
                "\tregion: // Specify the region your bucket was created in;",
                "\tidentityPoolId: // Specify your identityPoolId for Auth and Unauth access to your bucket;",
            "});"
        ]
    },
    "Storage Get": {
        "prefix": "Storage.get",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "Storage.get(${1:'test.txt'}, { level: ${2:'private'} })",
            "\t.then ( (result) => { ",
            "\t\tconsole.log(result); ", 
            "\t})",
            "\t.catch( (err) => { ",
            "\t\tconsole.log(err);",
            "\t});"
        ]
    },
    "Storage Put": {
        "prefix": "Storage.put",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "Storage.put(${1:'test.txt'}, ${2:'Protected Content'}, {",
            "\tlevel: ${3:'private'},",
            "\tcontentType: ${4:'text/plain'}",
            "})",
            ".then ( (result) => { ",
            "\tconsole.log(result); ", 
            "})",
            ".catch( (err) => { ",
            "\tconsole.log(err);",
            "});"
        ]
    },
    "S3ImageUpload": {
        "prefix": "S3ImageUpload",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "S3ImageUpload"
        ]
    },
    "onChange": {
        "prefix": "onChange",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "onChange"
        ]
    },
    "RNFetchBlob": {
        "prefix": "RNFetchBlob",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "RNFetchBlob"
        ]
    },
    "readFile": {
        "prefix": "readFile",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "readFile"
        ]
    },
    "contentType": {
        "prefix": "contentType",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "contentType"
        ]
    },
    "imageType": {
        "prefix": "imageType",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "imageType"
        ]
    },
    "react-native-fetch-blob": {
        "prefix": "react-native-fetch-blob",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "react-native-fetch-blob"
        ]
    },
    "Storage Remove": {
        "prefix": "Storage.remove",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "Storage.remove(${1:'test.txt'}, { level: ${2:'private'} })",
            "\t.then ( (result) => { ",
            "\t\tconsole.log(result); ", 
            "\t})",
            "\t.catch( (err) => { ",
            "\t\tconsole.log(err);",
            "\t});"
        ]
    },
    "Storage List": {
        "prefix": "Storage.list",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "Storage.list(${1:'photos/'}, { level: ${2:'protected'} })",
            "\t.then ( (result) => { ",
            "\t\tconsole.log(result); ", 
            "\t})",
            "\t.catch( (err) => { ",
            "\t\tconsole.log(err);",
            "\t});"
        ]
    },
    "PhotoPicker": {
        "prefix": "PhotoPicker",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "PhotoPicker"
        ]
    },
    "onLoad": {
        "prefix": "onLoad",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "onLoad"
        ]
    },
    "aws-amplify-react": {
        "prefix": "aws-amplify-react",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "aws-amplify-react"
        ]
    },
    "S3Image": {
        "prefix": "S3Image",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "S3Image"
        ]
    },
    "imgKey": {
        "prefix": "imgKey",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "imgKey"
        ]
    },
    "fileToKey": {
        "prefix": "fileToKey",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "fileToKey(data) {",
                "\tconst { name, size, type } = data;",
                "\treturn 'test_' + name;",
            "}"
        ]
    },
    "S3Album": {
        "prefix": "<S3Album",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "<S3Album",
            "\tlevel=${1:\"private\"}",
            "\tpath={path}",
            "\tfilter={(item) => ${2:/jpg/i.test(item.path)}}",
            "/>"
        ]
    },
    "amplify-photo-picker": {
        "prefix": "<amplify-photo-picker",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "<amplify-photo-picker",
            "\t(loaded)=\"onImagePreviewLoaded(\\$event)\"",
            "\t(picked)=\"onImageSelected(\\$event)\">",
            "</amplify-photo-picker>"
        ]
    },
    "amplify-s3-album": {
        "prefix": "<amplify-s3-album",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "<amplify-s3-album",
            "\tpath=\"\"",
            "\t(selected)=\"onAlbumImageSelected(\\$event)\">",
            "</amplify-s3-album>"
        ]
    },
    "Custom Upload Path": {
        "prefix": "customPrefix",
        "scope": "javascript,javascriptreact,typescript",
        "body": [
            "customPrefix: {",
                "\tpublic: ${1:'myPublicPrefix/'},",
                "\tprotected: ${2:'myProtectedPrefix/'},",
                "\tprivate: ${3:'myPrivatePrefix/'}",
            "};"
        ]
    }
}