{"version":3,"file":"Redirect.PGo7TZDD.mjs","names":["__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","c","init_jsx_runtime","ce","window","init_framer_BWFVvmND","addPropertyControls","ControlType","RedirectIfDraft","status","Frame","init_Redirect"],"sources":["https:/framerusercontent.com/modules/t6Q9t1R3J3U3ryCNz06M/lVI1I44wBd53IhUaOtUZ/Redirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";export function RedirectIfDraft({status}){useEffect(()=>{// Redirect ke 404 jika status adalah \"draft\"\nif(status===\"draft\"){window.location.replace(\"/404\");}},[status]);return /*#__PURE__*/_jsx(Frame,{width:1,height:1,background:\"transparent\"});}// Daftarkan prop dengan dropdown option di Framer UI\naddPropertyControls(RedirectIfDraft,{status:{title:\"Status\",type:ControlType.Enum,options:[\"published\",\"draft\"],optionTitles:[\"Published\",\"Draft\"],defaultValue:\"published\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"RedirectIfDraft\":{\"type\":\"reactComponent\",\"name\":\"RedirectIfDraft\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Redirect.map"],"mappings":"A,0LAAkI,SAAgBU,EAAgB,CAAC,UAAQ,CACzG,OAD0GL,MAAc,CACvLM,IAAS,SAASL,EAAO,SAAS,QAAQ,MAAM,CAAG,EAAE,CAACK,CAAM,CAAC,EAAsB,gBAAKC,EAAM,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,aAAa,CAAC,CAAE,C,8CAC9IJ,EAAoBE,EAAgB,CAAC,OAAO,CAAC,MAAM,SAAS,KAAKD,EAAY,KAAK,QAAQ,CAAC,YAAY,OAAO,EAAE,aAAa,CAAC,YAAY,OAAO,EAAE,aAAa,WAAW,CAAC,CAAC,C"}