{
	"$schema": "https://schemas.wp.org/trunk/block.json",
    "apiVersion": 3,
	"name": "tpgb/tp-image",
	"version": "0.1.0",
	"title": "Image",
	"category": "tpgb",
	"description": "Place images for an engaging layout.",
	"example": {
		"attributes": {}
	},
	"supports": {
    "anchor": true,
		"align": ["wide","full"]
	},
	"textdomain": "the-plus-addons-for-block-editor",
  "attributes": {
    "block_id": {
      "type": "string",
      "default": ""
    },
    "tImg": {
      "type": "object",
      "default": {
        "url": "",
        "Id": ""
      }
    },
    "capimg": {
      "type": "string",
      "default": ""
    },
    "ctmCap": {
      "type":"string",
      "source": "html",
      "selector": ".tpgb-image-caption",
      "default": ""
    },
    "tiLink": {
      "type": "object",
      "default": {
        "url": "",
        "target": "",
        "nofollow": ""
      }
    },
    "iSize": {
      "type": "string",
      "default": "full"
    },
    "tiAlign": {
      "type": "object",
      "default": {
        "md": "",
        "sm": "",
        "xs": ""
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}}{ text-align: {{tiAlign}}; } {{PLUS_WRAP}} .tpgb-figure{ justify-content: {{tiAlign}}; } {{PLUS_WRAP}} .tpgb-figure .tpgb-img-inner{ justify-self: {{tiAlign}}; }"
        }
      ],
      "scopy": true
    },
    "tiCap": {
      "type": "string",
      "default": "none"
    },
    "iWidth": {
      "type": "object",
      "default": {
        "md": "",
        "unit": "px"
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ width: {{iWidth}}; }"
        }
      ],
      "scopy": true
    },
    "imWidth": {
      "type": "object",
      "default": {
        "md": "",
        "unit": "px"
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ max-width: {{imWidth}}; }"
        }
      ],
      "scopy": true
    },
    "iHeig": {
      "type": "object",
      "default": {
        "md": "",
        "unit": "px"
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ height: {{iHeig}}; }"
        }
      ],
      "scopy": true
    },
    "imgFit": {
        "type": "object",
        "default": {
            "md": ""
        },
        "style": [
            {
            "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ object-fit: {{imgFit}}; object-position: center center; }"
            }
        ],
        "scopy": true
    },
    "inOpa": {
      "type": "string",
      "default": "",
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ opacity: {{inOpa}}; }"
        }
      ],
      "scopy": true
    },
    "iHOpa": {
      "type": "string",
      "default": "",
      "style": [
        {
          "selector": "{{PLUS_WRAP}}:hover img.tpgb-img-inner{ opacity: {{iHOpa}}; }"
        }
      ],
      "scopy": true
    },
    "inFilt": {
      "type": "object",
      "default": {
        "openFilter": false
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner"
        }
      ],
      "scopy": true
    },
    "iHfilt": {
      "type": "object",
      "default": {
        "openFilter": false
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}}:hover img.tpgb-img-inner"
        }
      ],
      "scopy": true
    },
    "intran": {
      "type": "string",
      "default": "0.3",
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ transition-duration: {{intran}}s; }"
        }
      ],
      "scopy": true
    },
    "ibord": {
      "type": "object",
      "default": {
        "openBorder": 0
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner"
        }
      ],
      "scopy": true
    },
    "ibrad": {
      "type": "object",
      "default": {
        "md": {
          "top": "",
          "right": "",
          "bottom": "",
          "left": ""
        },
        "unit": "px"
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner{ border-radius : {{ibrad}} } "
        }
      ],
      "scopy": true
    },
    "ishadow": {
      "type": "object",
      "default": {
        "openShadow": 0
      },
      "style": [
        {
          "selector": "{{PLUS_WRAP}} img.tpgb-img-inner"
        }
      ],
      "scopy": true
    },
    "icapTypo": {
      "type": "object",
      "default": {
        "openTypography": 0
      },
      "style": [
        {
          "condition": [
            {
              "key": "tiCap",
              "relation": "!=",
              "value": "none"
            }
          ],
          "selector": "{{PLUS_WRAP}} figcaption.tpgb-image-caption"
        }
      ],
      "scopy": true
    },
    "icapColor": {
      "type": "string",
      "default": "",
      "style": [
        {
          "condition": [
            {
              "key": "tiCap",
              "relation": "!=",
              "value": "none"
            }
          ],
          "selector": "{{PLUS_WRAP}} figcaption.tpgb-image-caption{ Color : {{icapColor}} }"
        }
      ],
      "scopy": true
    },
    "icapAlign": {
      "type": "object",
      "default": {
        "md": "",
        "sm": "",
        "xs": ""
      },
      "style": [
        {
          "condition": [
            {
              "key": "tiCap",
              "relation": "!=",
              "value": "none"
            }
          ],
          "selector": "{{PLUS_WRAP}} figcaption.tpgb-image-caption{ text-align: {{icapAlign}}; }"
        }
      ],
      "scopy": true
    },
    "icapbgColor": {
      "type": "string",
      "default": "",
      "style": [
        {
          "condition": [
            {
              "key": "tiCap",
              "relation": "!=",
              "value": "none"
            }
          ],
          "selector": "{{PLUS_WRAP}} figcaption.tpgb-image-caption{ background-Color : {{icapbgColor}} }"
        }
      ],
      "scopy": true
    },
    "caShadow": {
      "type": "object",
      "default": {
        "openShadow": 0,
        "typeShadow": "text-shadow",
        "horizontal": 2,
        "vertical": 3,
        "blur": 2,
        "color": "rgba(0,0,0,0.5)"
      },
      "style": [
        {
          "condition": [
            {
              "key": "tiCap",
              "relation": "!=",
              "value": "none"
            }
          ],
          "selector": "{{PLUS_WRAP}} figcaption.tpgb-image-caption"
        }
      ],
      "scopy": true
    },
    "icapSpa": {
      "type": "object",
      "default": {
        "md": 15,
        "unit": "px"
      },
      "style": [
        {
          "condition": [
            {
              "key": "tiCap",
              "relation": "!=",
              "value": "none"
            }
          ],
          "selector": "{{PLUS_WRAP}} figcaption.tpgb-image-caption{ margin-top : {{icapSpa}} }"
        }
      ]
    },
    "globalPosition": {
      "type": "object",
      "default": {
        "md": "",
        "sm": "",
        "xs": ""
      },
      "style": [
        {
          "selector": "{{PLUS_CLIENT_ID}}{ position : {{globalPosition}}; }",
          "backend": true
        }
      ]
    },
    "glohoriOffset": {
      "type": "object",
      "default": {
        "md": "0",
        "unit": "px"
      },
      "style": [
        {
          "condition": [
            {
              "key": "globalPosition",
              "relation": "==",
              "value": ["absolute", "fixed"]
            },
            {
              "key": "gloabhorizoOri",
              "relation": "==",
              "value": "left"
            }
          ],
          "selector": "{{PLUS_CLIENT_ID}}{ left : {{glohoriOffset}};right : auto; }",
          "backend": true
        },
        {
          "condition": [
            {
              "key": "globalPosition",
              "relation": "==",
              "value": ["absolute", "fixed"]
            },
            {
              "key": "gloabhorizoOri",
              "relation": "==",
              "value": "right"
            }
          ],
          "selector": "{{PLUS_CLIENT_ID}}{ right : {{glohoriOffset}};left : auto; }",
          "backend": true
        }
      ]
    },
    "gloverticalOffset": {
      "type": "object",
      "default": {
        "md": "0",
        "unit": "px"
      },
      "style": [
        {
          "condition": [
            {
              "key": "globalPosition",
              "relation": "==",
              "value": ["absolute", "fixed"]
            },
            {
              "key": "gloabverticalOri",
              "relation": "==",
              "value": "top"
            }
          ],
          "selector": "{{PLUS_CLIENT_ID}}{ top : {{gloverticalOffset}}; bottom : auto; }",
          "backend": true
        },
        {
          "condition": [
            {
              "key": "globalPosition",
              "relation": "==",
              "value": ["absolute", "fixed"]
            },
            {
              "key": "gloabverticalOri",
              "relation": "==",
              "value": "bottom"
            }
          ],
          "selector": "{{PLUS_CLIENT_ID}}{ bottom : {{gloverticalOffset}}; top : auto; }",
          "backend": true
        }
      ]
    },
    "dislazyLoad" : {
      "type": "boolean",
		  "default": false
    },
    "parentBlockName": {
        "type": "boolean",
        "default": false
    }
  },
  "usesContext": ["postId", "postType", "queryId", "tpgb/dynamicSubFieldData", "tpgb/dynamicRowIndex", "tpgb/dynamicPost", "tpgb/dynamicRepField"]
}