{"version":3,"sources":["../../../src/govuk/tools/_image-url.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,sBAAsB;AACtB,GAAG;AACH,gBAAgB;;AAEhB,YAAY;AACZ,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,8BAA8B;AAC9B,EAAE;AACF,iDAAiD;AACjD,4DAA4D;AAC5D,iBAAiB;;AAEjB;EACE,iBAAiB;EACjB;iCAC+B;;EAE/B;IACE;MACE,qDAAqD;IACvD,EAAE;MACA,sBAAsB;IACxB;EACF;;EAEA;IACE,8CAA8C;EAChD,EAAE;IACA,2CAA2C;EAC7C;AACF","file":"_image-url.scss","sourcesContent":["////\n/// @group tools/assets\n////\n@use \"sass:meta\";\n\n/// Image URL\n///\n/// If a custom image-url handler is defined ($govuk-image-url-function) then\n/// it will be called, otherwise a url will be returned with the filename\n/// appended to the image path.\n///\n/// @param {String} Filename for the image to load\n/// @return {String} URL for the filename, wrapped in `url()`\n/// @access public\n\n@function govuk-image-url($filename) {\n  // prettier-ignore\n  $custom-function: meta.variable-exists(\"govuk-image-url-function\")\n    and $govuk-image-url-function;\n\n  @if meta.type-of($custom-function) == \"string\" {\n    @if meta.function-exists($custom-function) {\n      $custom-function: meta.get-function($custom-function);\n    } @else {\n      $custom-function: null;\n    }\n  }\n\n  @if $custom-function {\n    @return meta.call($custom-function, $filename);\n  } @else {\n    @return url($govuk-images-path + $filename);\n  }\n}\n"]}
