export const getColumns=t=>{const e=[];return t&&t.length&&t.forEach((t=>{e.push({id:t.id,label:t.name})})),e};export const getEmailColumns=t=>{const e=[];return t&&t.length&&t.forEach((t=>{"email"===t.format&&e.push({id:t.id,label:t.name})})),e};export function getRoles(t){const e=window.tablesome_ajax_object.api_endpoints.workflow_user_roles;let n=[];return fetch(e,{method:"get",headers:{"Content-Type":"application/json","X-WP-Nonce":window.tablesome_ajax_object.rest_nonce}}).then((function(t){return t.json()})).then((function(e){if("success"==e.status&&e.data.length>0)return t.doAction({type:"SET_ACCESS_CONTROL",payload:{id:"roles",value:e.data,type:"options"}}),e.data})).catch((function(t){return n}))}