/**
 * Configuration for ILab Media Tools
 */
{
  /** Crop Tool */
  "crop": {
    "title": "Image Crop",
    "description": "Provides an easy to use tool for manually cropping images for all image sizes.",
    "source": "ilab-media-crop-tool.php",
    "class": "ILabMediaCropTool",
    "dependencies": [],
    "settings": {
      "title": "Crop Settings",
      "menu": "Crop Settings",
      "options-page": "media-tools-crop",
      "options-group": "ilab-media-crop",
      "groups": {
        "ilab-media-crop-settings": {
          "title": "Crop Settings",
          "description": "Put your crop settings here",
          "options": {
            "ilab-media-crop-quality": {
              "title": "Crop Quality",
              "type": "number"
            }
          }
        }
      }
    }
  },
  /** Imgix Tool */
  "imgix": {
    "title": "Imgix Support",
    "description": "Serves images through imgix.com",
    "source": "ilab-media-imgix-tool.php",
    "class": "ILabMediaImgixTool",
    "dependencies": [
      "crop",
      "s3"
    ],
    "helpers": [
      "ilab-imgix-helpers.php"
    ],
    "settings": {
      "title": "Imgix Settings",
      "menu": "Imgix Settings",
      "options-page": "media-tools-imgix",
      "options-group": "ilab-media-imgix",
      "groups": {
        "ilab-media-imgix-settings": {
          "title": "Imgix Settings",
          "description": "Required settings for imgix integration to work.",
          "options": {
            "ilab-media-imgix-domains": {
              "title": "Imgix Domains",
              "description": "List of your source domains.  For more information, please read the <a href='https://www.imgix.com/docs/tutorials/creating-sources' target='_blank'>imgix documentation</a>",
              "type": "text-area"
            },
            "ilab-media-imgix-signing-key": {
              "title": "Imgix Signing Key",
              "description": "Optional signing key to create secure URLs.  <strong>Recommended</strong>.  For information on setting it up, refer to the <a href='https://www.imgix.com/docs/tutorials/securing-images' target='_blank'>imgix documentation</a>.",
              "type": "password"
            },
            "ilab-media-imgix-use-https": {
              "title": "Use HTTPS",
              "description": "Use HTTPS for image URLs",
              "type": "checkbox"
            }
          }
        },
        "ilab-media-imgix-image-settings": {
          "title": "Imgix Image Settings",
          "description": "Put your imgix image settings here",
          "options": {
            "ilab-media-imgix-default-quality": {
              "title": "Lossy Image Quality",
              "type": "number"
            },
            "ilab-media-imgix-auto-format": {
              "title": "Auto Format",
              "description": "Allows imgix to choose the most appropriate file format to deliver your image based on the requesting web browser.",
              "type": "checkbox"
            },
            "ilab-media-imgix-auto-compress": {
              "title": "Auto Compress",
              "description": "Allows imgix to automatically compress your images.",
              "type": "checkbox"
            }
          }
        },
        "ilab-media-imgix-gif-settings": {
          "title": "Imgix GIF Settings",
          "description": "Controls how animated gifs appear on the site.",
          "options": {
            "ilab-media-imgix-enable-gifs": {
              "title": "Enable GIFs",
              "description": "Enables support for animated GIFs.  If this is not enabled, any uploaded GIFs will be converted.",
              "type": "checkbox"
            },
            "ilab-media-imgix-no-gif-sizes": {
              "title": "Disallow Animated GIFs for Sizes",
              "description": "List the sizes that aren't allowed to have animated GIFs.  These sizes will display jpegs instead.",
              "type": "text-area"
            }
          }
        }
      },
      "params": {
        "adjust": {
          "--Auto": {
            "auto": {
              "type": "pillbox",
              "options": {
                "enhance": {
                  "title": "Auto Enhance",
                  "default": 0
                },
                "redeye": {
                  "title": "Remove Red Eye",
                  "default": 0
                }
              }
            }
          },
          "Luminosity Controls": {
            "bri": {
              "title": "Brightness",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "con": {
              "title": "Contrast",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "exp": {
              "title": "Exposure",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "gam": {
              "title": "Gamma",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "high": {
              "title": "Highlight",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "shad": {
              "title": "Shadow",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            }
          },
          "Color Controls": {
            "hue": {
              "title": "Hue",
              "type": "slider",
              "min": -359,
              "max": 359,
              "default": 0
            },
            "sat": {
              "title": "Saturation",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "vib": {
              "title": "Vibrancy",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            }
          },
          "Noise/Sharpen/Blur": {
            "sharp": {
              "title": "Sharpen",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            },
            "nr": {
              "title": "Noise Reduction",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "nrs": {
              "title": "Noise Reduction Sharpen Bound",
              "type": "slider",
              "min": -100,
              "max": 100,
              "default": 0
            },
            "blur": {
              "title": "Blur",
              "type": "slider",
              "min": 0,
              "max": 2000,
              "default": 0
            }
          },
          "Transform": {
            "rot": {
              "title": "Rotation",
              "type": "slider",
              "min": -359,
              "max": 359,
              "default": 0
            }
          }
        },
        "stylize": {
          "Stylize": {
            "blend": {
              "title": "Tint",
              "type": "blend-color",
              "blend-param": "bm",
              "blends": {
                "none": "Normal",
                "color": "Color",
                "burn": "Burn",
                "dodge": "Dodge",
                "darken": "Darken",
                "difference": "Difference",
                "exclusion": "Exclusion",
                "hardlight": "Hard Light",
                "hue": "Hue",
                "lighten": "Lighten",
                "luminosity": "Luminosity",
                "multiply": "Multiply",
                "overlay": "Overlay",
                "saturation": "Saturation",
                "screen": "Screen",
                "softlight": "Soft Light"
              }
            },
            "htn": {
              "title": "Halftone",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            },
            "px": {
              "title": "Pixellate",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            },
            "mono": {
              "title": "Monochrome",
              "type": "color"
            },
            "sepia": {
              "title": "Sepia",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            }
          },
          "Border": {
            "border-color": {
              "title": "Border Color",
              "type": "color"
            },
            "border-width": {
              "title": "Border Width",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            }
          },
          "Padding": {
            "padding-color": {
              "title": "Padding Color",
              "type": "color"
            },
            "padding-width": {
              "title": "Padding Width",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            }
          }
        },
        "watermark": {
          "Watermark Media": {
            "media": {
              "title": "Watermark Image",
              "type": "media-chooser",
              "imgix-param": "mark",
              "dependents": [
                "markalign",
                "markalpha",
                "markpad",
                "markscale"
              ]
            }
          },
          "Watermark Settings": {
            "markalign": {
              "title": "Watermark Alignment",
              "type": "alignment"
            },
            "markalpha": {
              "title": "Watermark Alpha",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 100
            },
            "markpad": {
              "title": "Watermark Padding",
              "type": "slider",
              "min": 0,
              "max": 100,
              "default": 0
            },
            "markscale": {
              "title": "Watermark Scale",
              "type": "slider",
              "min": 0,
              "max": 200,
              "default": 100
            }
          }
        }
      }
    }
  },
  "s3": {
    "title": "S3",
    "description": "Automatically uploads media to Amazon S3.",
    "source": "ilab-media-s3-tool.php",
    "class": "ILabMediaS3Tool",
    "dependencies": [],
    "settings": {
      "title": "S3 Settings",
      "menu": "S3 Settings",
      "options-page": "media-tools-s3",
      "options-group": "ilab-media-s3",
      "groups": {
        "ilab-media-s3-aws-settings": {
          "title": "AWS Settings",
          "description": "To get S3 working, you'll have to supply your AWS credentials.  However, the better way of doing it would be to place that information in a .env file, instead of storing it in the database.",
          "options": {
            "ilab-media-s3-access-key": {
              "title": "AWS Access Key",
              "description": "If you are supplying this value through a .env file, or environment variables, the key is: <strong>ILAB_AWS_S3_ACCESS_KEY</strong>",
              "type": "text-field",
              "watch": true
            },
            "ilab-media-s3-secret": {
              "title": "AWS Secret",
              "description": "If you are supplying this value through a .env file, or environment variables, the key is: <strong>ILAB_AWS_S3_ACCESS_SECRET</strong>",
              "type": "password",
              "watch": true
            },
            "ilab-media-s3-bucket": {
              "title": "AWS Bucket",
              "description": "If you are supplying this value through a .env file, or environment variables, the key is: <strong>ILAB_AWS_S3_BUCKET</strong>",
              "type": "text-field",
              "watch": true
            },
            "ilab-media-s3-prefix": {
              "title": "AWS Bucket Prefix",
              "description": "This will prepend a prefix to any file uploaded to S3.  For dynamically created prefixes, you can use the following variables: <code>@{date:format}<\/code>, <code>@{site-name}<\/code>, <code>@{site-host}<\/code>, <code>@{user-name}<\/code>, <code>@{unique-id}<\/code>, <code>@{unique-path}<\/code>.  For the date token, format is any format string that you can use with php's date() function.  Note that specifying a prefix here will remove WordPress's default date prefix.  WordPress's default prefix would look like: <code>@{date:Y\/m}<\/code>",
              "type": "text-field",
              "watch": true
            }
          }
        },
        "ilab-media-s3-upload-handling-settings": {
          "title": "Media File Handling",
          "description": "The following options control how the S3 tool handles uploads.",
          "options": {
            "ilab-media-s3-delete-uploads": {
              "title": "Delete Uploaded Files",
              "description": "Deletes uploaded files from the WordPress server after they've been uploaded to S3.",
              "type": "checkbox"
            },
            "ilab-media-s3-delete-from-s3": {
              "title": "Delete From S3",
              "description": "When you delete from the media library, turning this on will also delete the file from S3.",
              "type": "checkbox"
            }
          }
        },
        "ilab-media-s3-cdn-settings": {
          "title": "CDN Settings",
          "description": "If you are using CloudFront, Fastly or another CDN, enter the CDN domain here.  If you are using Imgix, the <b>CDN Base URL</b> setting is ignored, but the <b>Document CDN Base URL</b> is not.  If both are left blank, Media Tools will use the S3 URL's.",
          "options": {
            "ilab-media-s3-cdn-base": {
              "title": "CDN Base URL",
              "description": "This is the base URL for your CDN for serving images, including the scheme (meaning the http/https part).  If you don't have a CDN, you can simply use the AWS S3 URL, eg <strong>https://s3-ap-southeast-1.amazonaws.com/your-bucket-name/</strong>.",
              "type": "text-field"
            },
            "ilab-doc-s3-cdn-base": {
              "title": "Document CDN Base URL",
              "description": "This is the base URL for your CDN for serving non-image files, including the scheme (meaning the http/https part).  This is separated for your convenience.  If you don't specify a document CDN, it'll use the media/image CDN.",
              "type": "text-field"
            }
          }
        }
      }
    }
  }
}