1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var network_1 = require("@shopify/network");
|
4 | var hooks_1 = require("../hooks");
|
5 | function RequireSriFor(_a) {
|
6 | var scripts = _a.scripts, styles = _a.styles;
|
7 | var value = [];
|
8 | if (scripts) {
|
9 | value.push(network_1.SriAsset.Script);
|
10 | }
|
11 | if (styles) {
|
12 | value.push(network_1.SriAsset.Style);
|
13 | }
|
14 | hooks_1.useCspDirective(network_1.CspDirective.RequireSriFor, value);
|
15 | return null;
|
16 | }
|
17 | exports.default = RequireSriFor;
|